diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-06-15 15:05:08 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-06-15 15:05:08 +0100 |
commit | 7718fb14602c410dc16a316bb4e9cc87850c0ee4 (patch) | |
tree | b07060339274ea45801371c7d318b507342ca9b4 /src/libutil | |
parent | 8ca6424889cf9d993d600e0a64b480e5b2b178d8 (diff) | |
download | rspamd-7718fb14602c410dc16a316bb4e9cc87850c0ee4.tar.gz rspamd-7718fb14602c410dc16a316bb4e9cc87850c0ee4.zip |
[Minor] Fix leak in unix sockets parsing
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/addr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libutil/addr.c b/src/libutil/addr.c index a00d2a86b..ce97e486c 100644 --- a/src/libutil/addr.c +++ b/src/libutil/addr.c @@ -349,7 +349,6 @@ rspamd_parse_unix_path (rspamd_inet_addr_t **target, const char *src) bool has_group = false; tokens = g_strsplit_set (src, " ,", -1); - addr = rspamd_inet_addr_create (AF_UNIX); rspamd_strlcpy (addr->u.un->addr.sun_path, tokens[0], @@ -422,6 +421,7 @@ rspamd_parse_unix_path (rspamd_inet_addr_t **target, const char *src) } g_free (pwbuf); + g_strfreev (tokens); if (target) { rspamd_ip_validate_af (addr); @@ -435,6 +435,7 @@ rspamd_parse_unix_path (rspamd_inet_addr_t **target, const char *src) err: + g_strfreev (tokens); g_free (pwbuf); rspamd_inet_address_free (addr); return FALSE; |