diff options
author | Michael Brown | 2007-05-15 18:53:46 +0200 |
---|---|---|
committer | Michael Brown | 2007-05-15 18:53:46 +0200 |
commit | b1755462ab344ff758c3a1e6ae0d10a729d96d1b (patch) | |
tree | 858bb7ba3d439be957f6b9530a0040b26c49f3f2 /src/core/job.c | |
parent | Data-transfer interface should now be functionally complete. (diff) | |
download | ipxe-b1755462ab344ff758c3a1e6ae0d10a729d96d1b.tar.gz ipxe-b1755462ab344ff758c3a1e6ae0d10a729d96d1b.tar.xz ipxe-b1755462ab344ff758c3a1e6ae0d10a729d96d1b.zip |
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.
Diffstat (limited to 'src/core/job.c')
-rw-r--r-- | src/core/job.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/job.c b/src/core/job.c index 7a0e0eef..1c589fc7 100644 --- a/src/core/job.c +++ b/src/core/job.c @@ -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 ); } /**************************************************************************** |