On 7/11/06, Fernando Apesteguía <fernando.apesteguia@xxxxxxxxx> wrote:
Hi, I would like to know how to free a list_head. I have almost 200 elements and I'm wonder if I must traverse the list for all the elements and do: list_for_each(...){ my_entry=list_entry(....) list_del(my_entry) kfree(my_entry) } Should I do this in this way? Best regards!
If your list has dynamically-allocated stuff, you need to free them first. -- What this world needs is a good five-dollar plasma weapon. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/