changeset 7541:eb9c7fb796d5

Core: fixed memory leak on error, missed in c3f60d618c17. Found by Coverity (CID 1451664).
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 19 Jul 2019 17:50:00 +0300
parents 9a970c905045
children 2fc9f853a6b7
files src/core/ngx_hash.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/ngx_hash.c
+++ b/src/core/ngx_hash.c
@@ -358,6 +358,7 @@ found:
                           "could not build %s, you should "
                           "increase %s_max_size: %i",
                           hinit->name, hinit->name, hinit->max_size);
+            ngx_free(test);
             return NGX_ERROR;
         }