From 1c72f1a08da59224e41a7c4d470491eeba3f09ee Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 3 May 2017 08:11:38 -0400 Subject: zebra: Fix leaked memory in label manager code When we fail to properly setup we can leak some memory. Signed-off-by: Donald Sharp --- zebra/label_manager.c | 1 + 1 file changed, 1 insertion(+) (limited to 'zebra') 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; -- cgit v1.2.3