[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

@@ -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 );