소스 검색

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;
 }