localspl: Check for NULL return from HeapAlloc.
authorMarcus Meissner <marcus@jet.franken.de>
Sat, 17 Oct 2009 10:40:42 +0000 (12:40 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 19 Oct 2009 12:43:57 +0000 (14:43 +0200)
dlls/localspl/provider.c

index e032a8e6c7d5f5f295ff3fe20ecce910a270ab7b..8c6a940b233db5813b76a27926c25f722447d35a 100644 (file)
@@ -193,7 +193,7 @@ static LPWSTR strdupW(LPCWSTR p)
     if(!p) return NULL;
     len = (lstrlenW(p) + 1) * sizeof(WCHAR);
     ret = heap_alloc(len);
-    memcpy(ret, p, len);
+    if (ret) memcpy(ret, p, len);
     return ret;
 }