From: Philippe E. <ph...@us...> - 2003-09-17 15:40:42
|
Update of /cvsroot/oprofile/oprofile/daemon In directory sc8-pr-cvs1:/tmp/cvs-serv12385/daemon Modified Files: opd_kernel.c Log Message: fix use after free of module Index: opd_kernel.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/daemon/opd_kernel.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -p -d -r1.34 -r1.35 --- opd_kernel.c 17 Sep 2003 15:28:33 -0000 1.34 +++ opd_kernel.c 17 Sep 2003 15:40:38 -0000 1.35 @@ -110,14 +110,15 @@ static void opd_clear_module_info(void) struct list_head * pos2; struct opd_module * module; - verbprintf("Removing module list\n"); + printf("Removing module list\n"); list_for_each_safe(pos, pos2, &opd_modules) { module = list_entry(pos, struct opd_module, module_list); if (module->name) free(module->name); free(module); - list_del(pos); } + + list_init(&opd_modules); opd_for_each_image(opd_delete_modules); } |