diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-05-03 14:11:38 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-05-03 14:11:38 +0200 |
commit | 1c72f1a08da59224e41a7c4d470491eeba3f09ee (patch) | |
tree | 568904cae7dd6a5493f089d1f916a5f18dc1acbb /zebra/label_manager.c | |
parent | Merge pull request #442 from Jafaral/pim-hello-fix (diff) | |
download | frr-1c72f1a08da59224e41a7c4d470491eeba3f09ee.tar.xz frr-1c72f1a08da59224e41a7c4d470491eeba3f09ee.zip |
zebra: Fix leaked memory in label manager code
When we fail to properly setup we can leak some memory.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r-- | zebra/label_manager.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/zebra/label_manager.c b/zebra/label_manager.c index 9f8378572..bf67141cd 100644 --- a/zebra/label_manager.c +++ b/zebra/label_manager.c @@ -228,6 +228,7 @@ struct label_manager_chunk *assign_label_chunk(u_char proto, u_short instance, if (lmc->start > MPLS_MAX_UNRESERVED_LABEL - size + 1) { zlog_err("Reached max labels. Start: %u, size: %u", lmc->start, size); + XFREE(MTYPE_LM_CHUNK, lmc); return NULL; } lmc->end = lmc->start + size - 1; |