>               return NULL;
> -     }
> -     memcpy(buf, "sip:", 4);
> -     memcpy(buf+4, pres_user->s, pres_user->len);
> -     buf[pres_user->len+4] = '@';
> -     memcpy(buf + pres_user->len + 5, pres_domain->s, pres_domain->len);
> -     buf[pres_user->len + 5 + pres_domain->len]= '\0';
> -
> -     pres_uri = (str*)pkg_malloc(sizeof(str));
> -     if(pres_uri == NULL)
> -     {
> -             LM_ERR("while allocating memory\n");
> -             return NULL;
> -     }
> -     memset(pres_uri, 0, sizeof(str));

Memset just before setting it.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/177/files#r10510194
_______________________________________________
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to