Browse Source

p_usrloc: clean memory in case of malloc error

Daniel-Constantin Mierla 12 years ago
parent
commit
c50a8ba36a
1 changed files with 2 additions and 0 deletions
  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;
 }