From 14eafc5b8de58c4495087cddfefe89e03ccda70c Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 17 Feb 2009 01:45:12 +0000 Subject: [comboot] Fix reference counting on replacement images When chaining COMBOOT images, the old images now get freed correctly. --- src/include/gpxe/image.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/gpxe/image.h b/src/include/gpxe/image.h index 0163b0824..f8b1482ee 100644 --- a/src/include/gpxe/image.h +++ b/src/include/gpxe/image.h @@ -53,7 +53,12 @@ struct image { * style similar to a Unix exec() call) should return from its * exec() method with the replacement image set to point to * the new image. The new image must already be in a suitable - * state for execution. + * state for execution (i.e. loaded). + * + * If an image unregisters itself as a result of being + * executed, it must make sure that its replacement image (if + * any) is registered, otherwise the replacement is likely to + * be freed before it can be executed. */ struct image *replacement; }; -- cgit v1.2.3-55-g7522