@lyatanski commented on this pull request.


> @@ -440,7 +451,15 @@ int pv_fetch_contacts(
                return -1;
        }
 
-       ptr = 0; //r->contacts;TODO
+       rpp->impi.s = (char *)pkg_malloc(r->private_identity.len * 
sizeof(char));
+       if(rpp->impi.s == NULL) {
+               LM_ERR("no mem for impi\n");
+               return -1;

yes, I have done it using AOR as example. I'm not sure if it is going to be a 
problem as in the config script we should have `reg_free_contacts("caller");` 
and even in failure case it should free the memory.

Anyway, if you recommend to use `goto error;` instead, I have no objections and 
I'll change it in both places. Please confirm.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4166#discussion_r2029946718
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/pull/4166/review/2744967...@github.com>
_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to