diff options
Diffstat (limited to 'ospf6d/ospf6_message.c')
-rw-r--r-- | ospf6d/ospf6_message.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index 19ea2c77..71ff3628 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -1119,6 +1119,10 @@ ospf6_iobuf_size (int size) sendnew = XMALLOC (MTYPE_OSPF6_MESSAGE, size); if (recvnew == NULL || sendnew == NULL) { + if (recvnew) + XFREE (MTYPE_OSPF6_MESSAGE, recvnew); + if (sendnew) + XFREE (MTYPE_OSPF6_MESSAGE, sendnew); zlog_info ("Could not allocate I/O buffer of size %d.", size); return iobuflen; } |