]> granicus.if.org Git - libnl/commit
idiag: fix idiagnl_msg_clone()
authorThomas Haller <thaller@redhat.com>
Mon, 24 Nov 2014 16:14:54 +0000 (17:14 +0100)
committerThomas Haller <thaller@redhat.com>
Mon, 24 Nov 2014 17:36:52 +0000 (18:36 +0100)
commit39ca54ab4d9464e8951a0c67fe33ff1ce906e642
tree8bf064214497cc2ae3558a686955a177653ad961
parentf40fd71701e444d91a02c7f06ffbd4fcf232c9b9
idiag: fix idiagnl_msg_clone()

For one, we did not clone all pointer values. Hence, every cloned
object was very broken and resulted in dangling pointers and
double free/unref.

Apparently nobody was really using this function up to now.

Also, fix the return cases for NLE_NOMEM, so that we did not assume
ownership of pointers in 'src'.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
lib/idiag/idiag_msg_obj.c