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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(line);
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
pid = 0;
|
pid = 0;
|
||||||
@ -621,6 +620,7 @@ bool rc_service_daemons_crashed(const char *service)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
closedir(dp);
|
closedir(dp);
|
||||||
|
free(line);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user