diff --git a/debian/patches/series b/debian/patches/series index 5bba9f7c2..1a908ddf7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -43,6 +43,7 @@ sipwise/http_client-add-method-parameter-to-http_connect.patch sipwise/lost-add-method-parameter-to-http_connect-calls.patch sipwise/usrloc-don-t-synchronize-on-destroy-for-DB_ONLY.patch sipwise/presence_offline_cleanup.patch +sipwise/pvheaders_memleak.patch ### active development sipwise/permissions-don-t-allow-reloads-in-the-middle-of-ong.patch sipwise/dlg_get_var_error_more_verbose_on_dlg diff --git a/debian/patches/sipwise/pvheaders_memleak.patch b/debian/patches/sipwise/pvheaders_memleak.patch new file mode 100644 index 000000000..8c0f0ebe9 --- /dev/null +++ b/debian/patches/sipwise/pvheaders_memleak.patch @@ -0,0 +1,31 @@ +--- a/src/modules/pv_headers/pvh_xavp.c ++++ b/src/modules/pv_headers/pvh_xavp.c +@@ -713,7 +713,13 @@ xavp_c_data_t *pvh_set_parsed( + return c_data; + + err: +- // how can I call?? pvh_xavi_free_data(c_data, shm_free); ++ if(c_data != NULL) { ++ if(c_data->value.s != NULL) { ++ shm_free(c_data->value.s); ++ } ++ shm_free(c_data); ++ c_data = NULL; ++ } + return NULL; + } + +@@ -886,6 +892,13 @@ int pvh_set_uri(struct sip_msg *msg, pv_ + err: + if(pv_format) + pv_elem_free_all(pv_format); ++ if(c_data != NULL) { ++ if(c_data->value.s != NULL) { ++ shm_free(c_data->value.s); ++ } ++ shm_free(c_data); ++ c_data = NULL; ++ } + return -1; + } +