mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 04:20:17 +03:00
Do not hold self-references. This then avoids the problem of having to
ensure that we only drop our self-reference exactly once. To maintain the guarantee that an object won't go out of scope unexpectedly while one of its event handlers is being called, the event-calling functions now automatically obtain and drop extra references.
This commit is contained in:
@@ -27,10 +27,11 @@
|
||||
*/
|
||||
|
||||
void job_done ( struct job_interface *job, int rc ) {
|
||||
struct job_interface *dest = job_dest ( job );
|
||||
struct job_interface *dest = job_get_dest ( job );
|
||||
|
||||
dest->op->done ( dest, rc );
|
||||
job_unplug ( job );
|
||||
job_put ( dest );
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user