]> 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:12:25 +0000 (10:12 +0100)
src/libutil/addr.c

index 1687c80bd32ec656f1c8e21867ba9e1fdf62f228..ee70a90f4ee3cdb318df20eb4e7b91568fe16927 100644 (file)
@@ -287,8 +287,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) {