diff options
author | Brad King <brad.king@kitware.com> | 2003-06-12 20:18:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-06-12 20:18:07 (GMT) |
commit | 751509cf10468a07e808d60467175d55883607a3 (patch) | |
tree | eec9e96753e9c1011bc8982d5f95525231bb7a7c /Source/kwsys | |
parent | ef5214c6c52d81df38923feefd147dccb18200be (diff) | |
download | CMake-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.c | 5 |
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. */ |