We should only free the buffer when done reading the dir.
This commit is contained in:
parent
e47661449a
commit
e505e6ea41
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user