Skip to content

Commit

Permalink
pua: check if local requests are dropped and free the param
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed May 2, 2024
1 parent 00aac8d commit 53e1a29
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/modules/pua/pua.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,11 @@ int update_pua(ua_pres_t *p)
ret_code = -1;
goto done;
}
if(uac_r.cb_flags & TMCB_LOCAL_REQUEST_DROP) {
shm_free(cb_param);
ret_code = 0;
goto done;
}
} else {
str met = {"SUBSCRIBE", 9};
ua_pres_t *cb_param = NULL;
Expand Down
3 changes: 3 additions & 0 deletions src/modules/pua/send_publish.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,9 @@ int send_publish(publ_info_t *publ)
LM_ERR("in t_request tm module function\n");
goto error;
}
if(uac_r.cb_flags & TMCB_LOCAL_REQUEST_DROP) {
shm_free(cb_param);
}

done:
ret = 0;
Expand Down

0 comments on commit 53e1a29

Please sign in to comment.