[comboot] Fix reference counting on replacement images

When chaining COMBOOT images, the old images now get freed correctly.
This commit is contained in:
Michael Brown
2009-02-17 01:45:12 +00:00
parent 8904cd55f1
commit 14eafc5b8d
5 changed files with 22 additions and 17 deletions

View File

@@ -122,6 +122,7 @@ static int com32_exec ( struct image *image ) {
DBGC ( image, "COM32 %p: exited to run kernel %p\n",
image, comboot_replacement_image );
image->replacement = comboot_replacement_image;
comboot_replacement_image = NULL;
image_autoload ( image->replacement );
break;

View File

@@ -191,6 +191,7 @@ static int comboot_exec ( struct image *image ) {
DBGC ( image, "COMBOOT %p: exited to run kernel %p\n",
image, comboot_replacement_image );
image->replacement = comboot_replacement_image;
comboot_replacement_image = NULL;
image_autoload ( image->replacement );
break;