]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix memory leak when accepting from unix sockets
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 24 May 2017 09:12:25 +0000 (10:12 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 24 May 2017 09:19:22 +0000 (10:19 +0100)
src/libutil/addr.c

index 082cbb9414203ea66a795625de04830cd384cc03..6253dc16505366bb0b37d7605693cb3ec445dd23 100644 (file)
@@ -292,8 +292,6 @@ rspamd_accept_from_socket (gint sock, rspamd_inet_addr_t **target,
                addr->slen = len;
 
                if (addr->af == AF_UNIX) {
-                       addr->u.un = g_slice_alloc0 (sizeof (*addr->u.un));
-                       /* Get name from the listening socket */
                        len = sizeof (su);
 
                        if (getsockname (sock, &su.sa, &len) != -1) {