diff options
author | stbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2016-03-15 18:41:59 +0000 |
---|---|---|
committer | stbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2016-03-15 18:41:59 +0000 |
commit | 5a34155c904b768e37682eb6e789cfe533cfa98c (patch) | |
tree | 46cad53d0081e950286a10369c6eedcff0f901dc | |
parent | 7ced6beffcfc466cfccc242692270c78809261a4 (diff) | |
download | lighttpd-5a34155c904b768e37682eb6e789cfe533cfa98c.tar.gz |
[core] fix memory leak in configparser_merge_data
Release op1 memory on failure; fixes some theoretical memory leaks (a
failure results in early exit anyway).
From: Stefan Bühler <stbuehler@web.de>
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3101 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/configparser.y | 1 |
2 files changed, 2 insertions, 0 deletions
@@ -29,6 +29,7 @@ NEWS * [mod_fastcgi,mod_scgi] fix leaking file-descriptor when backend spawning failed (reported by Fortify Open Review Project) * [core] improve array API to prevent memory leaks * [core] refactor array search; raise array size limit to SSIZE_MAX + * [core] fix memory leak in configparser_merge_data - 1.4.39 - 2016-01-02 * [core] fix memset_s call (fixes #2698) diff --git a/src/configparser.y b/src/configparser.y index 10241456..24efb6b0 100644 --- a/src/configparser.y +++ b/src/configparser.y @@ -71,6 +71,7 @@ data_unset *configparser_merge_data(data_unset *op1, const data_unset *op2) { return (data_unset *)ds; } else { fprintf(stderr, "data type mismatch, cannot merge\n"); + op1->free(op1); return NULL; } } |