From 755eb3956d7f6eca0efd90283efe1963f46db5de Mon Sep 17 00:00:00 2001 From: Roberto De Ioris Date: Wed, 28 Jan 2015 06:49:56 +0100 Subject: [PATCH] fixed exception handler for arguments --- core/exceptions.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/exceptions.c b/core/exceptions.c index 63c1371a..00d38c23 100644 --- a/core/exceptions.c +++ b/core/exceptions.c @@ -464,6 +464,7 @@ void uwsgi_exception_setup_handlers() { struct uwsgi_string_list *usl = uwsgi.exception_handlers_instance; while(usl) { + // do not free handler !!! char *handler = uwsgi_str(usl->value); char *colon = strchr(handler, ':'); if (colon) { @@ -472,10 +473,8 @@ void uwsgi_exception_setup_handlers() { struct uwsgi_exception_handler *ueh = uwsgi_exception_handler_by_name(handler); if (!ueh) { uwsgi_log("unable to find exception handler: %s\n", handler); - free(handler); exit(1); } - free(handler); struct uwsgi_exception_handler_instance *uehi = uwsgi_calloc(sizeof(struct uwsgi_exception_handler_instance)); uehi->handler = ueh;