Null check rec on process_destroy

This may be a possible code path from handle_exec, if so then
we might dereference null.
This commit is contained in:
Maya Rashish 2017-04-27 02:16:58 +03:00
commit 25869b260b

View file

@ -175,6 +175,8 @@ static PROCESS_REC *process_find(const char *name, int verbose)
static void process_destroy(PROCESS_REC *rec, int status)
{
if (rec == NULL) return;
processes = g_slist_remove(processes, rec);
signal_emit("exec remove", 2, rec, GINT_TO_POINTER(status));