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 <dcb314@hotmail.com>
Signed-off-by: Brandon Philips <bphilips@suse.de>
This commit is contained in:
Brandon Philips 2011-03-23 12:03:49 -07:00 committed by Stephen Hemminger
parent d7ac9ad4f4
commit 1f7190db39
1 changed files with 1 additions and 1 deletions

View File

@ -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);