Fix memory leak

CID:		1393352
This commit is contained in:
Baptiste Daroussin 2018-06-12 16:42:11 +00:00
parent 5a43dca273
commit 43d7b1c097

View File

@ -117,6 +117,7 @@ stop_pr(struct pr *pr)
err(2, "kevent");
wstatus = pr->e[0].data;
close(pr->kq);
free(pr);
if (WIFEXITED(wstatus) && WEXITSTATUS(wstatus) != 0)
errx(2, "pr exited abnormally");
else if (WIFSIGNALED(wstatus))