ERR: Added error check for malloc of process control structure.
This commit is contained in:
parent
ef5214c6c5
commit
751509cf10
|
@ -210,6 +210,11 @@ kwsysProcess* kwsysProcess_New()
|
||||||
|
|
||||||
/* Allocate a process control structure. */
|
/* Allocate a process control structure. */
|
||||||
cp = (kwsysProcess*)malloc(sizeof(kwsysProcess));
|
cp = (kwsysProcess*)malloc(sizeof(kwsysProcess));
|
||||||
|
if(!cp)
|
||||||
|
{
|
||||||
|
/* Could not allocate memory for the control structure. */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
ZeroMemory(cp, sizeof(*cp));
|
ZeroMemory(cp, sizeof(*cp));
|
||||||
|
|
||||||
/* Set initial status. */
|
/* Set initial status. */
|
||||||
|
|
Loading…
Reference in New Issue