mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-12 12:18:18 +00:00
fix a little leak reported by skopii
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9240 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
e813797406
commit
9658d82b1c
@ -165,7 +165,7 @@ char *expand_alias(char *cmd, char *arg)
|
||||
{
|
||||
char *errmsg = NULL;
|
||||
char *r = NULL;
|
||||
char *sql;
|
||||
char *sql = NULL;
|
||||
char *exp = NULL;
|
||||
switch_core_db_t *db = switch_core_db_handle();
|
||||
int full = 0;
|
||||
@ -179,6 +179,8 @@ char *expand_alias(char *cmd, char *arg)
|
||||
free(errmsg);
|
||||
}
|
||||
|
||||
switch_safe_free(sql);
|
||||
|
||||
if (!r) {
|
||||
sql = switch_mprintf("select command from aliases where alias='%q %q'", cmd, arg);
|
||||
|
||||
@ -193,6 +195,7 @@ char *expand_alias(char *cmd, char *arg)
|
||||
}
|
||||
}
|
||||
|
||||
switch_safe_free(sql);
|
||||
|
||||
if (r) {
|
||||
if (arg && !full) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user