diff options
| author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2009-07-24 00:53:08 -0300 | 
|---|---|---|
| committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2009-07-24 00:53:08 -0300 | 
| commit | 8a77a967204d04cdf202622f22a49b76e860b1e5 (patch) | |
| tree | d98ee62d1873c054d5873a5348ac06e6302b8d51 | |
| parent | e14563909bb107aa5502f69210071334220ebd02 (diff) | |
Plug file descriptor leak (as per Debian bug #523930).
Thanks to giagimari at libero dot it for strace logs.
| -rw-r--r-- | hardinfo2/arch/linux/common/sensors.h | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/hardinfo2/arch/linux/common/sensors.h b/hardinfo2/arch/linux/common/sensors.h index 2a656bc3..ae68c22a 100644 --- a/hardinfo2/arch/linux/common/sensors.h +++ b/hardinfo2/arch/linux/common/sensors.h @@ -319,7 +319,6 @@ static void read_sensors_hddtemp(void)      if ((s = sock_connect("127.0.0.1", 7634))) {  	while (!len)  	    len = sock_read(s, buffer, sizeof(buffer)); -	sock_close(s);  	if (len > 2 && buffer[0] == '|' && buffer[1] == '/') {  	    gchar **disks; @@ -354,6 +353,7 @@ static void read_sensors_hddtemp(void)  	g_free(old);  	old = NULL;      } +    sock_close(s);      if (old) {  	sensors = g_strconcat(sensors, "\n", old, NULL);  | 
