X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udev_utils.c;h=64a7ba9caae0929356584acf1217f897fc43078e;hp=70b20e3a289c2e96cd7bd83837dfe5079df44c0a;hb=7628ff6e144a94c48e463d0188022f5661e0ba40;hpb=6a522681e1438bbd9c317654cc35d5d206d378ad diff --git a/udev_utils.c b/udev_utils.c index 70b20e3a2..64a7ba9ca 100644 --- a/udev_utils.c +++ b/udev_utils.c @@ -108,6 +108,10 @@ void udev_cleanup_device(struct udevice *udev) list_del(&name_loop->node); free(name_loop); } + list_for_each_entry_safe(name_loop, temp_loop, &udev->run_list, node) { + list_del(&name_loop->node); + free(name_loop); + } } int string_is_true(const char *str) @@ -405,10 +409,10 @@ int execute_command(const char *command, const char *subsystem) close(devnull); } retval = execv(arg, argv); - err("exec of child failed"); + err("exec of child '%s' failed", command); _exit(1); case -1: - dbg("fork of child failed"); + dbg("fork of child '%s' failed", command); break; return -1; default: