summaryrefslogtreecommitdiffstats
path: root/src/core/image.c
diff options
context:
space:
mode:
authorMichael Brown2009-02-17 02:45:12 +0100
committerMichael Brown2009-02-17 02:45:12 +0100
commit14eafc5b8de58c4495087cddfefe89e03ccda70c (patch)
tree9538cfb2b84050d3416b1f100a6e29356cb3a95c /src/core/image.c
parent[comboot] Allow for tail recursion of COMBOOT images (diff)
downloadipxe-14eafc5b8de58c4495087cddfefe89e03ccda70c.tar.gz
ipxe-14eafc5b8de58c4495087cddfefe89e03ccda70c.tar.xz
ipxe-14eafc5b8de58c4495087cddfefe89e03ccda70c.zip
[comboot] Fix reference counting on replacement images
When chaining COMBOOT images, the old images now get freed correctly.
Diffstat (limited to 'src/core/image.c')
-rw-r--r--src/core/image.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/image.c b/src/core/image.c
index 741b0547..277d09a9 100644
--- a/src/core/image.c
+++ b/src/core/image.c
@@ -275,8 +275,7 @@ int image_exec ( struct image *image ) {
/* Pick up replacement image before we drop the original
* image's temporary reference.
*/
- if ( ( replacement = image->replacement ) != NULL )
- image_get ( replacement );
+ replacement = image->replacement;
/* Drop temporary reference to the original image */
image_put ( image );