[2/9] wpp: Manage malloc failure in pp_xstrdup [try 2]
Matteo Bruni
matteo.mystral at gmail.com
Thu Oct 1 07:20:20 CDT 2009
-------------- next part --------------
From 087105f9464f8ad065af35c1c647319efb270dd4 Mon Sep 17 00:00:00 2001
From: Matteo Bruni <matteo.mystral at gmail.com>
Date: Mon, 28 Sep 2009 20:42:48 +0200
Subject: 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);
}
--
1.6.3.3
More information about the wine-patches
mailing list