File net-tools-1.60-fclose.diff of Package net-tools

--- net-tools-1.60/iptunnel.c	2009-08-06 16:15:00.000000000 +0200
+++ net-tools-1.60/iptunnel.c	2009-08-06 16:15:51.000000000 +0200
@@ -485,6 +485,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",
@@ -521,6 +522,7 @@
 			       tx_packets, tx_bytes, tx_errs, tx_colls, tx_carrier, tx_drops);
 		}
 	}
+	fclose (fp);
 	return 0;
 }
 
openSUSE Build Service is sponsored by