iproute2/iproute2-memleak.diff

12 lines
326 B
Diff
Raw Normal View History

--- ip/ipmaddr.c 2009-09-16 11:21:21.000000000 +0200
+++ ip/ipmaddr.c 2009-09-16 11:23:14.000000000 +0200
@@ -136,7 +136,7 @@
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);