From 1f7190db3920f76cca7fdcd1bb318c6cfa4a3266 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Wed, 23 Mar 2011 12:03:49 -0700 Subject: [PATCH] ip: fix memory leak in ipmaddr.c If the continue is taken, then there is a memory leak. https://bugzilla.novell.com/show_bug.cgi?id=538996 Reported-by: David Binderman Signed-off-by: Brandon Philips --- ip/ipmaddr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/ipmaddr.c b/ip/ipmaddr.c index ec326bc..5a52c85 100644 --- a/ip/ipmaddr.c +++ b/ip/ipmaddr.c @@ -136,7 +136,7 @@ void read_igmp(struct ma_info **result_p) m.addr.bytelen = 4; while (fgets(buf, sizeof(buf), fp)) { - struct ma_info *ma = malloc(sizeof(m)); + struct ma_info *ma; if (buf[0] != '\t') { sscanf(buf, "%d%s", &m.index, m.name); -- 2.39.2