iproute2/iproute2-iptunnel-fclose.diff

19 lines
471 B
Diff
Raw Normal View History

--- ip/iptunnel.c 2009-07-28 13:28:59.000000000 +0200
+++ ip/iptunnel.c 2009-07-28 13:29:29.000000000 +0200
@@ -400,6 +400,7 @@
if ((ptr = strchr(buf, ':')) == NULL ||
(*ptr++ = 0, sscanf(buf, "%s", name) != 1)) {
fprintf(stderr, "Wrong format of /proc/net/dev. Sorry.\n");
+ fclose (fp);
return -1;
}
if (sscanf(ptr, "%ld%ld%ld%ld%ld%ld%ld%*d%ld%ld%ld%ld%ld%ld%ld",
@@ -438,6 +439,7 @@
}
printf("\n");
}
+ fclose (fp);
return 0;
}