summaryrefslogtreecommitdiff
blob: d7b0e24e07d98a3f22d7704429c900a35b3311d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
http://bugs.gentoo.org/151293

--- rc.c
+++ rc.c
@@ -177,9 +177,10 @@
     char *home, dotrc[1024] = { 0 };
 
     home = getenv("HOME");
-    strcpy(dotrc, home);
-    strcat(dotrc, "/.slmonrc");
-    free(home);
+    if ( home != NULL ) {
+    	strcpy(dotrc, home);
+	strcat(dotrc, "/.slmonrc");
+    }
 
     if ((f = fopen("/etc/slmonrc", "r")) != NULL) {
 	slmon_conf_parse(f);