linux-atm/linux-atm-2.5.0-fdleak.patch
OBS User autobuild 44db8cc164 Accepting request 22204 from Base:System
Copy from Base:System/linux-atm based on submit request 22204 from user msmeissn

OBS-URL: https://build.opensuse.org/request/show/22204
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/linux-atm?expand=0&rev=7
2009-10-12 12:49:15 +00:00

23 lines
578 B
Diff

Index: src/arpd/atmarp.c
===================================================================
--- src/arpd/atmarp.c.orig 2009-10-10 01:49:14.000000000 +0200
+++ src/arpd/atmarp.c 2009-10-10 01:51:34.000000000 +0200
@@ -90,14 +90,17 @@ static int print_table(void)
}
while ((size = read(fd,buffer,BUF_SIZE))) {
if (size < 0) {
+ close(fd);
perror("read " ATMARP_DUMP_DIR "/" ATMARP_DUMP_FILE);
return 1;
}
if (write(0,buffer,size) < 0) {
+ close(fd);
perror("write stdout");
return 1;
}
}
+ close(fd);
return 0;
}