fix another leak

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13447 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West 2009-05-27 01:58:19 +00:00
parent 8021f11dda
commit d5583a531d
1 changed files with 2 additions and 1 deletions

View File

@ -1154,7 +1154,7 @@ SWITCH_STANDARD_API(presence_api_function)
SWITCH_STANDARD_API(chat_api_function) SWITCH_STANDARD_API(chat_api_function)
{ {
char *lbuf, *argv[5]; char *lbuf = NULL, *argv[5];
int argc = 0; int argc = 0;
if (!switch_strlen_zero(cmd) && (lbuf = strdup(cmd)) if (!switch_strlen_zero(cmd) && (lbuf = strdup(cmd))
@ -1170,6 +1170,7 @@ SWITCH_STANDARD_API(chat_api_function)
stream->write_function(stream, "Invalid"); stream->write_function(stream, "Invalid");
} }
switch_safe_free(lbuf);
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }