summaryrefslogtreecommitdiffstats
path: root/Source/kwsys
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-06-12 20:18:07 (GMT)
committerBrad King <brad.king@kitware.com>2003-06-12 20:18:07 (GMT)
commit751509cf10468a07e808d60467175d55883607a3 (patch)
treeeec9e96753e9c1011bc8982d5f95525231bb7a7c /Source/kwsys
parentef5214c6c52d81df38923feefd147dccb18200be (diff)
downloadCMake-751509cf10468a07e808d60467175d55883607a3.zip
CMake-751509cf10468a07e808d60467175d55883607a3.tar.gz
CMake-751509cf10468a07e808d60467175d55883607a3.tar.bz2
ERR: Added error check for malloc of process control structure.
Diffstat (limited to 'Source/kwsys')
-rw-r--r--Source/kwsys/ProcessWin32.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c
index abe6b9e..ed50efe 100644
--- a/Source/kwsys/ProcessWin32.c
+++ b/Source/kwsys/ProcessWin32.c
@@ -210,6 +210,11 @@ kwsysProcess* kwsysProcess_New()
/* Allocate a process control structure. */
cp = (kwsysProcess*)malloc(sizeof(kwsysProcess));
+ if(!cp)
+ {
+ /* Could not allocate memory for the control structure. */
+ return 0;
+ }
ZeroMemory(cp, sizeof(*cp));
/* Set initial status. */