summaryrefslogtreecommitdiffstats
path: root/src/cc4group.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cc4group.c')
-rw-r--r--src/cc4group.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cc4group.c b/src/cc4group.c
index 368b6aa..dd926f3 100644
--- a/src/cc4group.c
+++ b/src/cc4group.c
@@ -256,12 +256,6 @@ static void* cc4group_createTmpMemoryFile(CC4Group* const this, const size_t siz
return NULL;
}
- if(unlink(TMP_FILE) == -1)
- {
- fprintf(stderr, "WARNING: unlink: Failed to delete tmp file \"" TMP_FILE "\". Manual deletion is required: %s\n", strerror(errno));
- }
-#undef TMP_FILE
-
void* mmapExtra;
ret = cc4group_mapSizedWriteFd(this, tmpFile, size, &mmapExtra);
if(ret == MAP_FAILED)
@@ -293,6 +287,12 @@ static void* cc4group_createTmpMemoryFile(CC4Group* const this, const size_t siz
return NULL;
}
+ if(unlink(TMP_FILE) == -1)
+ {
+ fprintf(stderr, "WARNING: unlink: Failed to delete tmp file \"" TMP_FILE "\". Manual deletion is required: %s\n", strerror(errno));
+ }
+#undef TMP_FILE
+
return ret;
}