[comboot] Fix reference counting on replacement images
[people/lynusvaz/gpxe.git] / src / arch / i386 / image / com32.c
index 27ccbc0..3e81f48 100644 (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;