- fixed leak due to no free of new buffer - reported by Libor Chocholaty (cherry picked from commit 198e468b7d83bb62d0761dd45e5c6820bc75a61a)
@@ -169,7 +169,7 @@ int th_msg_received(void *data)
{
sip_msg_t msg;
str *obuf;
- char *nbuf;
+ char *nbuf = NULL;
int direction;
int dialog;
@@ -241,6 +241,8 @@ int th_msg_received(void *data)
obuf->s[obuf->len] = '\0';
done:
+ if(nbuf!=NULL)
+ pkg_free(nbuf);
free_sip_msg(&msg);
return 0;
}