aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/core/multiprocessing.c11
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;
}