From: Thomas Haller Date: Mon, 24 Nov 2014 16:14:53 +0000 (+0100) Subject: idiag: fix memory leak in idiagnl_msg_set_cong() X-Git-Tag: libnl3_2_26rc1~27^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f40fd71701e444d91a02c7f06ffbd4fcf232c9b9;p=thirdparty%2Flibnl.git idiag: fix memory leak in idiagnl_msg_set_cong() Acked-by: Thomas Graf Signed-off-by: Thomas Haller --- diff --git a/lib/idiag/idiag_msg_obj.c b/lib/idiag/idiag_msg_obj.c index 00c0562..1d9fde8 100644 --- a/lib/idiag/idiag_msg_obj.c +++ b/lib/idiag/idiag_msg_obj.c @@ -324,6 +324,7 @@ char *idiagnl_msg_get_cong(const struct idiagnl_msg *msg) void idiagnl_msg_set_cong(struct idiagnl_msg *msg, char *cong) { + free (msg->idiag_cong); msg->idiag_cong = strdup(cong); }