summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libutil/util.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libutil/util.c b/src/libutil/util.c
index aaaa09f27..20da1a371 100644
--- a/src/libutil/util.c
+++ b/src/libutil/util.c
@@ -1926,8 +1926,11 @@ rspamd_shmem_mkstemp (gchar *pattern)
break;
}
else if (errno != EEXIST) {
- g_error ("%s: failed to create temp shmem %s: %s",
+ msg_err ("%s: failed to create temp shmem %s: %s",
G_STRLOC, nbuf, strerror (errno));
+ g_free (nbuf);
+
+ return -1;
}
}