提交 d5583a53 authored 作者: Brian West's avatar Brian West

fix another leak

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13447 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 8021f11d
...@@ -1154,7 +1154,7 @@ SWITCH_STANDARD_API(presence_api_function) ...@@ -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) ...@@ -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;
} }
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论