~ruther/guix-local

ref: dcb95c1fc936d74dfdf84b7e59eff66cb99c5a63 guix-local/gnu/packages/patches/xinetd-fix-fd-leak.patch -rw-r--r-- 592 bytes
dcb95c1f — Ludovic Courtès monads: Add a template and specialization mechanism for monadic procedures. 9 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Fix a file descriptor leak:

https://github.com/xinetd-org/xinetd/issues/23

Patch copied from Debian:

https://anonscm.debian.org/cgit/collab-maint/xinetd.git/tree/debian/patches/000012-fix_fd_leak

Patch sent upstream at https://github.com/xinetd-org/xinetd/pull/26.

diff --git a/xinetd/xgetloadavg.c b/xinetd/xgetloadavg.c
index 5a26214..fe0f872 100644
--- a/xinetd/xgetloadavg.c
+++ b/xinetd/xgetloadavg.c
@@ -34,7 +34,7 @@ double xgetloadavg(void)
 
    if( fscanf(fd, "%lf", &ret) != 1 ) {
       perror("fscanf");
-      return -1;
+      ret = -1;
    }
 
    fclose(fd);
-- 
2.7.4