diff options
-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. */ |