]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Don't risk the double free, use switch_safe_free here same as in ~15 lines.
authorWilliam King <william.king@quentustech.com>
Sun, 15 Sep 2013 22:57:17 +0000 (15:57 -0700)
committerWilliam King <william.king@quentustech.com>
Sun, 15 Sep 2013 22:57:17 +0000 (15:57 -0700)
src/mod/applications/mod_httapi/mod_httapi.c

index e5bfac12aeee457ac1265ac023b1798e77c40ad2..6ae30018043d1003a17190b348a18d4358163965 100644 (file)
@@ -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);