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:
parent
d7ac9ad4f4
commit
1f7190db39
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue