From: William King Date: Sun, 15 Sep 2013 22:57:17 +0000 (-0700) Subject: Don't risk the double free, use switch_safe_free here same as in ~15 lines. X-Git-Tag: v1.5.6~125^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3329141e74a56d8efdfe9fd2fe0e5385a0c3c196;p=thirdparty%2Ffreeswitch.git Don't risk the double free, use switch_safe_free here same as in ~15 lines. --- diff --git a/src/mod/applications/mod_httapi/mod_httapi.c b/src/mod/applications/mod_httapi/mod_httapi.c index e5bfac12ae..6ae3001804 100644 --- a/src/mod/applications/mod_httapi/mod_httapi.c +++ b/src/mod/applications/mod_httapi/mod_httapi.c @@ -2343,7 +2343,7 @@ static char *load_cache_data(http_file_context_t *context, const char *url) if ((p = strchr(dext, '?'))) { *p = '\0'; ext = dext; - } else free(dext); + } else switch_safe_free(dext); } context->cache_file_base = switch_core_sprintf(context->pool, "%s%s%s", globals.cache_path, SWITCH_PATH_SEPARATOR, digest);