]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Do not die if shmem_mkstemp fails
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 17 Jun 2016 13:28:58 +0000 (14:28 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 17 Jun 2016 13:28:58 +0000 (14:28 +0100)
src/libutil/util.c

index aaaa09f27aeed92308f11cf5f63100f54787cb2f..20da1a37122fba9476137536287c4dd65eec55c7 100644 (file)
@@ -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;
                }
        }