Committer: Tim Just <tim.just@xxxxxxxxxxxxxx> Date: 19/03/2010 at 11:04:44 Revision: 3701 Revision-id: tim.just@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Branch nick: tiny Log: Improve lmod_uninit_packet_types and added call in hip_exit. Modified: M hipd/init.c M lib/modularization/lmod.c === modified file 'hipd/init.c' --- hipd/init.c 2010-03-19 08:45:27 +0000 +++ hipd/init.c 2010-03-19 09:03:41 +0000 @@ -1112,6 +1112,8 @@ hip_uninit_maint_functions(); + lmod_uninit_packet_types(); + #ifdef CONFIG_HIP_OPPORTUNISTIC hip_oppdb_uninit(); #endif === modified file 'lib/modularization/lmod.c' --- lib/modularization/lmod.c 2010-03-19 08:45:27 +0000 +++ lib/modularization/lmod.c 2010-03-19 09:03:41 +0000 @@ -530,6 +530,19 @@ } /** + * lmod_free_packet_entry + * + * Free allocated memory for one entry of the packet type list. + * + */ +static void lmod_free_packet_entry(void *entry) +{ + struct packet_type *packte_type_entry = entry; + free(packte_type_entry->identifier); + free(packte_type_entry); +} + +/** * lmod_uninit_packet_types * * Free all allocated memory for storage of the packet type list. @@ -539,5 +552,5 @@ */ void lmod_uninit_packet_types(void) { - hip_ll_uninit(&packet_types, free); + hip_ll_uninit(&packet_types, lmod_free_packet_entry); }