From e505e6ea4131224d4f11e87d8b086c9e35b448a2 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 21 Mar 2008 08:31:04 +0000 Subject: We should only free the buffer when done reading the dir. --- src/librc/librc-daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/librc/librc-daemon.c b/src/librc/librc-daemon.c index 46162d51..d553b876 100644 --- a/src/librc/librc-daemon.c +++ b/src/librc/librc-daemon.c @@ -553,7 +553,6 @@ bool rc_service_daemons_crashed(const char *service) break; } } - free(line); fclose(fp); pid = 0; @@ -621,6 +620,7 @@ bool rc_service_daemons_crashed(const char *service) break; } closedir(dp); + free(line); return retval; } -- cgit v1.2.3