Skip to content

Commit

Permalink
textops: fix memory leak in when converting body to multipart with se…
Browse files Browse the repository at this point in the history
…t_body_multipart()
  • Loading branch information
sergey-vb authored and miconda committed Apr 28, 2016
1 parent e9c25da commit 61435f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/textops/textops.c
Expand Up @@ -1763,6 +1763,8 @@ int set_multibody_helper(struct sip_msg* msg, char* p1, char* p2, char* p3)
}
pkg_free(nbb);
if(nc.s!=NULL) pkg_free(nc.s);
if(convert && nb.s!=NULL) pkg_free(nb.s);
if(convert && oc.s!=NULL) pkg_free(oc.s);
LM_DBG("set flag FL_BODY_MULTIPART\n");
msg->msg_flags |= FL_BODY_MULTIPART;
return 1;
Expand Down

0 comments on commit 61435f4

Please sign in to comment.