Module: wine Branch: master Commit: 9b61ca1c0f59b0f968d5a7f69fa2ca95c11d49f0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=9b61ca1c0f59b0f968d5a7f69f...
Author: Matteo Bruni matteo.mystral@gmail.com Date: Mon Sep 28 20:42:48 2009 +0200
wpp: Manage malloc failure in pp_xstrdup.
---
libs/wpp/preproc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libs/wpp/preproc.c b/libs/wpp/preproc.c index 2ebec83..c071c56 100644 --- a/libs/wpp/preproc.c +++ b/libs/wpp/preproc.c @@ -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); }