summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobhe <tobhe@cvs.openbsd.org>2020-09-21 09:42:08 +0000
committertobhe <tobhe@cvs.openbsd.org>2020-09-21 09:42:08 +0000
commit81a2af786b4cdc720b7b42d08dbb906819fddfd4 (patch)
tree32d75fd16f692944013f33b3516db75b84e1dd83
parent7f5c664af353b95fbe8d62dcd90ba04ea141ff9d (diff)
Fix memory leak in "iov".
ok jca@
-rw-r--r--usr.sbin/httpd/config.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/httpd/config.c b/usr.sbin/httpd/config.c
index 0db7b3d43fe..804d58ea728 100644
--- a/usr.sbin/httpd/config.c
+++ b/usr.sbin/httpd/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.60 2020/08/26 06:50:20 florian Exp $ */
+/* $OpenBSD: config.c,v 1.61 2020/09/21 09:42:07 tobhe Exp $ */
/*
* Copyright (c) 2011 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -385,8 +385,10 @@ config_setserver_fcgiparams(struct httpd *env, struct server *srv)
if (proc_composev(ps, PROC_SERVER, IMSG_CFG_FCGI, iov, c) != 0) {
log_warn("%s: failed to compose IMSG_CFG_FCGI imsg for "
"`%s'", __func__, srv_conf->name);
+ free(iov);
return (-1);
}
+ free(iov);
return (0);
}