summaryrefslogtreecommitdiff
path: root/lib/msg.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-06-10 17:53:37 +0200
committerThomas Haller <thaller@redhat.com>2014-06-10 21:45:51 +0200
commit29a38942aaae5a9a1145a92babfb2ad32dddb187 (patch)
tree03003d480ffd51d9ac104638f5951e2d15113914 /lib/msg.c
parentbb44548b924d41b148c39ab5f4907c52bcba1003 (diff)
downloadlibnl-29a38942aaae5a9a1145a92babfb2ad32dddb187.tar.gz
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 <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'lib/msg.c')
-rw-r--r--lib/msg.c2
1 files changed, 1 insertions, 1 deletions
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);
}
}