]> granicus.if.org Git - libnl/commitdiff
utils: Initialize list head after freeing translation list
authorThomas Graf <tgraf@redhat.com>
Mon, 10 Oct 2011 10:02:33 +0000 (12:02 +0200)
committerThomas Graf <tgraf@redhat.com>
Mon, 10 Oct 2011 10:02:33 +0000 (12:02 +0200)
Problem found and fix proposed by Andrew Kraslavsky <andykras@hotmail.com>

lib/utils.c

index 37ad4ccd867bd810e0ff2fbbe7dd743282b10784..0ec7626339e2133e77fd609a68637b8b96e8bacb 100644 (file)
@@ -885,6 +885,8 @@ void __trans_list_clear(struct nl_list_head *head)
                free(tl->a);
                free(tl);
        }
+
+       nl_init_list_head(head);
 }
 
 char *__type2str(int type, char *buf, size_t len,