diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-23 12:26:19 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-23 12:26:19 -0400 |
| commit | 7ad35beeb67a00dda252c57e4a3f3fc04cbb3318 (patch) | |
| tree | a9c008c2d08bd621ae5a09b20d9c73244516ffea | |
| parent | 71c98089bc7cddaae2eab41ab09e250c7a0a43ca (diff) | |
| download | stasis-7ad35beeb67a00dda252c57e4a3f3fc04cbb3318.tar.gz | |
Check t_name and tp independently for errors
| -rw-r--r-- | src/lib/core/multiprocessing.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/core/multiprocessing.c b/src/lib/core/multiprocessing.c index 06815a1..7b16af3 100644 --- a/src/lib/core/multiprocessing.c +++ b/src/lib/core/multiprocessing.c @@ -195,7 +195,16 @@ struct MultiProcessingTask *mp_pool_task(struct MultiProcessingPool *pool, const char *t_name = NULL; t_name = xmkstemp(&tp, "w"); - if (!t_name || !tp) { + if (!t_name) { + SYSERROR("%s", "Failed to create temporary file name"); + if (tp) { + fclose(tp); + } + return NULL; + } + if (!tp) { + SYSERROR("%s", "Failed to create temporary file"); + guard_free(t_name); return NULL; } |
