mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
handle error message leaks and other error conditions, Found by Klockwork (www.klocwork.com)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8440 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -96,6 +96,10 @@ SWITCH_DECLARE(int) switch_core_db_exec(switch_core_db_t *db, const char *sql, s
|
||||
|
||||
if (errmsg) {
|
||||
*errmsg = err;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "SQL ERR [%s]\n", err);
|
||||
switch_core_db_free(err);
|
||||
err = NULL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user