From 29a38942aaae5a9a1145a92babfb2ad32dddb187 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 10 Jun 2014 17:53:37 +0200 Subject: lib: reorder free() after printf("%p") statements Previously coverity was complaining about a use-after-free. This was not a real problem, because the printf statement does not dereferenciate the pointer. Change it to avoid the warning. Acked-by: Thomas Graf Signed-off-by: Thomas Haller --- lib/msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/msg.c') diff --git a/lib/msg.c b/lib/msg.c index 68f706ec..bcf1aa8d 100644 --- a/lib/msg.c +++ b/lib/msg.c @@ -569,8 +569,8 @@ void nlmsg_free(struct nl_msg *msg) if (msg->nm_refcnt <= 0) { free(msg->nm_nlh); - free(msg); NL_DBG(2, "msg %p: Freed\n", msg); + free(msg); } } -- cgit v1.2.3