summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsemarie <semarie@openbsd.org>2016-02-14 18:20:59 +0000
committersemarie <semarie@openbsd.org>2016-02-14 18:20:59 +0000
commit3fbbbb84db587aa93d86e38ba80e763351a866db (patch)
tree81f4bd047dd2c6e3ac1734215bdc7e7d56b14c21
parentSimplify address parsing code by only using inet_net_pton(3). (diff)
downloadwireguard-openbsd-3fbbbb84db587aa93d86e38ba80e763351a866db.tar.xz
wireguard-openbsd-3fbbbb84db587aa93d86e38ba80e763351a866db.zip
httpd patterns double free
issue and diff from Alexander Schrijver alex at flupzor nl ok reyk@
-rw-r--r--usr.sbin/httpd/patterns.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/httpd/patterns.c b/usr.sbin/httpd/patterns.c
index 42e4b25accc..c6910785b46 100644
--- a/usr.sbin/httpd/patterns.c
+++ b/usr.sbin/httpd/patterns.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: patterns.c,v 1.4 2015/08/18 08:26:39 reyk Exp $ */
+/* $OpenBSD: patterns.c,v 1.5 2016/02/14 18:20:59 semarie Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
@@ -26,7 +26,7 @@
/*
* Derived from Lua 5.3.1:
- * $Id: patterns.c,v 1.4 2015/08/18 08:26:39 reyk Exp $
+ * $Id: patterns.c,v 1.5 2016/02/14 18:20:59 semarie Exp $
* Standard library for string operations and pattern-matching
*/
@@ -708,5 +708,6 @@ str_match_free(struct str_match *m)
for (i = 0; i < m->sm_nmatch; i++)
free(m->sm_match[i]);
free(m->sm_match);
+ m->sm_match = NULL;
m->sm_nmatch = 0;
}