@vingarzan commented on this pull request.


> +     shm_str_dup_macro(x->vrf, vrf);
+       if(!x->vrf.s)
+               goto error;

https://github.com/kamailio/kamailio/blob/d2c3db281e08f53f4b4e892978ebf43df6be58ce/src/modules/cdp/utils.h#L67

So it seems it is wasteful, but safe (including zero-padding). I was more of a 
fan of a variant where it would not allocate anything and the check if "empty" 
was on str->len, not str->s. Hence all is good.

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

Message ID: <kamailio/kamailio/pull/4423/review/[email protected]>
_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to