From 086b9ef44986f157c627aafd17ad4ad640db9c6c Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 9 Oct 2008 08:43:20 +0200 Subject: [PATCH] network plugin: Fix a minor memory leak. Thanks to Niraj Tolia for reporting this :) --- src/network.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/network.c b/src/network.c index 0f558ca9..0ea51b3b 100644 --- a/src/network.c +++ b/src/network.c @@ -1550,7 +1550,10 @@ static int network_config (const char *key, const char *val) fields_num = strsplit (val_cpy, fields, 3); if ((fields_num != 1) && (fields_num != 2)) + { + sfree (val_cpy); return (1); + } else if (fields_num == 2) { if ((service = strchr (fields[1], '.')) != NULL) @@ -1563,6 +1566,8 @@ static int network_config (const char *key, const char *val) network_add_listen_socket (node, service); else network_add_sending_socket (node, service); + + sfree (val_cpy); } else if (strcasecmp ("TimeToLive", key) == 0) { -- 2.30.2