From 2651c0d69c95a0a114bb65a684d83c89a8a49a36 Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Sun, 21 Aug 2011 12:39:34 +0000 Subject: Sync OpenBSD patchset 947: Fix a couple of memory leaks, from marcel partap. --- status.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'status.c') diff --git a/status.c b/status.c index 04669849..1baab922 100644 --- a/status.c +++ b/status.c @@ -551,8 +551,10 @@ status_find_job(struct client *c, char **iptr) /* First try in the new tree. */ so_find.cmd = cmd; so = RB_FIND(status_out_tree, &c->status_new, &so_find); - if (so != NULL && so->out != NULL) + if (so != NULL && so->out != NULL) { + xfree(cmd); return (so->out); + } /* If not found at all, start the job and add to the tree. */ if (so == NULL) { -- cgit