From 751509cf10468a07e808d60467175d55883607a3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 12 Jun 2003 16:18:07 -0400 Subject: [PATCH] ERR: Added error check for malloc of process control structure. --- Source/kwsys/ProcessWin32.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c index abe6b9e24..ed50efee3 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. */