]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_http_cache] Fix leaking curl handle in http_get()
authorAndrey Volk <andywolk@gmail.com>
Thu, 27 Oct 2022 21:27:55 +0000 (00:27 +0300)
committerAndrey Volk <andywolk@gmail.com>
Thu, 27 Oct 2022 22:00:17 +0000 (01:00 +0300)
src/mod/applications/mod_http_cache/mod_http_cache.c

index d6f4fb6ed8f710b34d23d0a1da498edf07d58b8c..9d19099e564d74de151845c0cb9812ff27eda273 100644 (file)
@@ -1167,6 +1167,7 @@ static switch_status_t http_get(url_cache_t *cache, http_profile_t *profile, cac
                switch_curl_easy_cleanup(curl_handle);
                close(get_data.fd);
        } else {
+               switch_curl_easy_cleanup(curl_handle);
                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "open() error: %s\n", strerror(errno));
                status = SWITCH_STATUS_GENERR;
                goto done;