wpp: Manage malloc failure in pp_xstrdup.

This commit is contained in:
Matteo Bruni 2009-09-28 20:42:48 +02:00 committed by Alexandre Julliard
parent 026ca4cd00
commit 9b61ca1c0f
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}