浏览代码

p_usrloc: clean memory in case of malloc error

Daniel-Constantin Mierla 12 年之前
父节点
当前提交
c50a8ba36a
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      modules_k/p_usrloc/ucontact.c

+ 2 - 0
modules_k/p_usrloc/ucontact.c

@@ -105,6 +105,8 @@ error:
 	if (c->user_agent.s) shm_free(c->user_agent.s);
 	if (c->callid.s) shm_free(c->callid.s);
 	if (c->c.s) shm_free(c->c.s);
+	if (c->ruid.s) shm_free(c->ruid.s);
+	if (c->instance.s) shm_free(c->instance.s);
 	shm_free(c);
 	return 0;
 }