]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[process] Hold reference to process during call to step()
authorMichael Brown <mcb30@ipxe.org>
Fri, 13 Jun 2008 02:39:22 +0000 (03:39 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 15 Jun 2010 15:26:28 +0000 (16:26 +0100)
commit068ef5f72d6acd7ebdd3ec4065c9e9aeb6ff9b1b
treec3e9e4717e346088eeac2bbd61d8b2dda8945336
parent1798e04ebbb4f86ef1b1ba1432f835482b1543b2
[process] Hold reference to process during call to step()

It is conceivable that the process may terminate during the execution
of step().  If nothing else holds a reference to the containing
object, this would cause the object to be freed prior to returning
from step().

Add a ref_get()/ref_put() around the call to ->step() to prevent this
from happening.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/process.c