]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_httapi] Fix memory leak of dup_creds in httapi_sync()
authorAndrey Volk <andywolk@gmail.com>
Thu, 21 Jan 2021 14:40:29 +0000 (17:40 +0300)
committerAndrey Volk <andywolk@gmail.com>
Wed, 17 Mar 2021 16:18:33 +0000 (19:18 +0300)
src/mod/applications/mod_httapi/mod_httapi.c

index 76d273d020996df5dea7707c3a1535cbdf0fc244..cc2c857a583d6b6b27d6ec7f21263d3b8dc34d00 100644 (file)
@@ -1534,6 +1534,7 @@ static switch_status_t httapi_sync(client_t *client)
                char *q, *p = strstr(dynamic_url, "://");
                use_url++;
 
+               switch_safe_free(dup_creds);
                dup_creds = strdup(p+3);
                *p = '\0';