diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-09-27 16:29:03 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-09-27 16:29:03 -0400 |
commit | a84b874a027fd8007efc10e0602396c4b5da170c (patch) | |
tree | f7604930a6a604446408bea64574cf23697a0506 /src/multiprocessing.c | |
parent | 9f535ba4e016f02c6d1bca45d6adfd04a036c9c1 (diff) | |
download | stasis-a84b874a027fd8007efc10e0602396c4b5da170c.tar.gz |
Fix leak
* When strdup fails and the temporary file handle is open, close the handle and die.
* reported by @kmacdonald-stsci
Diffstat (limited to 'src/multiprocessing.c')
-rw-r--r-- | src/multiprocessing.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/multiprocessing.c b/src/multiprocessing.c index 1320a2a..74ba981 100644 --- a/src/multiprocessing.c +++ b/src/multiprocessing.c @@ -117,7 +117,7 @@ struct MultiProcessingTask *mp_pool_task(struct MultiProcessingPool *pool, const // Create a temporary file to act as our intermediate command script FILE *tp = NULL; - char *t_name; + char *t_name = NULL; t_name = xmkstemp(&tp, "w"); if (!t_name || !tp) { return NULL; |