process: Cancel all asynchronous jobs on reinit
[petitboot] / discover / device-handler.c
index 78fb159a3026a2d515d05d0467eae27bd4e33938..3cf7edff082d9f6f880ccdd19c18fa698490cbce 100644 (file)
@@ -358,6 +358,9 @@ void device_handler_reinit(struct device_handler *handler)
                handler->pending_boot_is_default = false;
        }
 
+       /* Cancel any remaining async jobs */
+       process_stop_async_all();
+
        /* free unresolved boot options */
        list_for_each_entry_safe(&handler->unresolved_boot_options,
                        opt, tmp, list)