提交 16bf3f42 authored 作者: Michael Jerris's avatar Michael Jerris

don't leak after allocation failure. Found by Klockwork (www.klocwork.com)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8443 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 d24752a5
......@@ -734,6 +734,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_serialize(switch_event_t *event, ch
/* go ahead and give ourselves some space to work with, should save a few reallocs */
if (!(encode_buf = malloc(encode_len))) {
switch_safe_free(buf);
return SWITCH_STATUS_MEMERR;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论