wpp: Manage malloc failure in pp_xstrdup.
This commit is contained in:
parent
026ca4cd00
commit
9b61ca1c0f
|
@ -110,6 +110,8 @@ char *pp_xstrdup(const char *str)
|
|||
assert(str != NULL);
|
||||
len = strlen(str)+1;
|
||||
s = pp_xmalloc(len);
|
||||
if(!s)
|
||||
return NULL;
|
||||
return memcpy(s, str, len);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue