mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-17 01:02:12 +00:00
[mod_pgsql] Fix memory leek in the case of an empty string of err_str in pgsql_handle_exec_base_detailed()
This commit is contained in:
parent
e614f08c93
commit
c282386fdb
@ -515,6 +515,7 @@ error:
|
|||||||
err_str = pgsql_handle_get_error(handle);
|
err_str = pgsql_handle_get_error(handle);
|
||||||
|
|
||||||
if (zstr(err_str)) {
|
if (zstr(err_str)) {
|
||||||
|
switch_safe_free(err_str);
|
||||||
if (!er) {
|
if (!er) {
|
||||||
err_str = strdup((char *)"SQL ERROR!");
|
err_str = strdup((char *)"SQL ERROR!");
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user