From 481a6a9d1b5c6419a02d9b008483e8ca27dd09d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joaqu=C3=ADn=20Aguirrezabalaga?= Date: Thu, 20 Jul 2017 08:21:29 +0200 Subject: [PATCH] src/rrd_client.c: fix memeory leak in rrd_client_info A string is being duplicated with strdup and the copy was not being freed. --- src/rrd_client.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rrd_client.c b/src/rrd_client.c index 1bfbef2a..9786f8e0 100644 --- a/src/rrd_client.c +++ b/src/rrd_client.c @@ -1279,6 +1279,10 @@ rrd_info_t *rrd_client_info(rrd_client_t *client, const char *filename) /* {{{ * cd = rrd_info_push(cd, sprintf_alloc("%s",k), itype, info); if(!data) data = cd; + if (itype == RD_I_STR) { + free(info.u_str); + info.u_str = NULL; + } } out_free_res: -- 2.47.2