Skip to content

Commit

Permalink
dialog: prevent double free in case of errors
Browse files Browse the repository at this point in the history
(cherry picked from commit eef59c1)
  • Loading branch information
razvancrainea committed May 19, 2014
1 parent da5e51c commit c80b51b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/dialog/dlg_tophiding.c
Expand Up @@ -211,6 +211,8 @@ int dlg_replace_contact(struct sip_msg* msg, struct dlg_cell* dlg)
LM_ERR("failed inserting '<sip:'\n");
goto error;
}
/* make sure we do not free this string in case of a further error */
prefix = NULL;

if ((lump = insert_subst_lump_after(lump, SUBST_SND_ALL, HDR_CONTACT_T)) == 0) {
LM_ERR("failed inserting SUBST_SND buf\n");
Expand Down

0 comments on commit c80b51b

Please sign in to comment.