]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_pgsql] Fix memory leek in the case of an empty string of err_str in pgsql_handle...
authorAndrey Volk <andywolk@gmail.com>
Thu, 21 Jan 2021 15:29:44 +0000 (18:29 +0300)
committerAndrey Volk <andywolk@gmail.com>
Wed, 17 Mar 2021 16:19:39 +0000 (19:19 +0300)
src/mod/databases/mod_pgsql/mod_pgsql.c

index e2efa5252c5b20711ccfb276973ea308194d1b84..f7c2983f91830930d2430676572bbb9019c6f1ae 100644 (file)
@@ -515,6 +515,7 @@ error:
        err_str = pgsql_handle_get_error(handle);
 
        if (zstr(err_str)) {
+               switch_safe_free(err_str);
                if (!er) {
                        err_str = strdup((char *)"SQL ERROR!");
                } else {