diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-05-15 11:43:15 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-05-15 11:43:15 (GMT) |
commit | db43c8cbed9e1d40d644e2ecb9112606d4a528bd (patch) | |
tree | 9b8af7e7ed03c253b6db378c174598ba9d10fc87 | |
parent | 062f4d052949b2cd7d7a912c8c4980913a8d6f5b (diff) | |
download | tcl-db43c8cbed9e1d40d644e2ecb9112606d4a528bd.zip tcl-db43c8cbed9e1d40d644e2ecb9112606d4a528bd.tar.gz tcl-db43c8cbed9e1d40d644e2ecb9112606d4a528bd.tar.bz2 |
One more ckalloc -> attemptckalloc (in compat/waitpid.c), since we can handle the error.
-rw-r--r-- | compat/waitpid.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compat/waitpid.c b/compat/waitpid.c index 6f43934..e41361b 100644 --- a/compat/waitpid.c +++ b/compat/waitpid.c @@ -156,7 +156,11 @@ waitpid( goto waitAgain; } } - waitPtr = (WaitInfo *) ckalloc(sizeof(WaitInfo)); + waitPtr = (WaitInfo *) attemptckalloc(sizeof(WaitInfo)); + if (!waitPtr) { + errno = ENOMEM; + return -1; + } waitPtr->pid = result; waitPtr->status = status; waitPtr->nextPtr = deadList; |