18 lines
383 B
Diff
18 lines
383 B
Diff
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);
|