summaryrefslogtreecommitdiffstats
path: root/sbin/hastd
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2010-09-26 10:39:01 +0000
committerpjd <pjd@FreeBSD.org>2010-09-26 10:39:01 +0000
commit22936fe435847a6e743572294f52c3f75e107c9d (patch)
tree3128a2f5371215b5fc3751177ec66904d267ff4c /sbin/hastd
parent56cf3f4638b438377f6172652c2723db71a426b2 (diff)
downloadFreeBSD-src-22936fe435847a6e743572294f52c3f75e107c9d.zip
FreeBSD-src-22936fe435847a6e743572294f52c3f75e107c9d.tar.gz
Plug memory leak on fork(2) failure.
Submitted by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
Diffstat (limited to 'sbin/hastd')
-rw-r--r--sbin/hastd/hooks.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/hastd/hooks.c b/sbin/hastd/hooks.c
index eff2f6f..35c3255 100644
--- a/sbin/hastd/hooks.c
+++ b/sbin/hastd/hooks.c
@@ -388,6 +388,7 @@ hook_execv(const char *path, va_list ap)
switch (pid) {
case -1: /* Error. */
pjdlog_errno(LOG_ERR, "Unable to fork to execute %s", path);
+ hook_free(hp);
return;
case 0: /* Child. */
descriptors();
OpenPOWER on IntegriCloud