forked from Mirrors/freeswitch
don't leak db error string. Found by Klockwork (www.klocwork.com)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8452 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
5418702cda
commit
0cb54b0a97
@ -2025,6 +2025,12 @@ SWITCH_STANDARD_API(show_function)
|
||||
} else if (!strcasecmp(as, "xml")) {
|
||||
switch_core_db_exec(db, sql, show_as_xml_callback, &holder, &errmsg);
|
||||
|
||||
if (errmsg) {
|
||||
stream->write_function(stream, "-ERR SQL Error [%s]\n", errmsg);
|
||||
switch_core_db_free(errmsg);
|
||||
errmsg = NULL;
|
||||
}
|
||||
|
||||
if (holder.xml) {
|
||||
char count[50];
|
||||
char *xmlstr;
|
||||
|
Loading…
Reference in New Issue
Block a user