Browse Source

[embed] Add missing register_image() to image/embedded.c

When the embedded image is a script, the unregister_image() performed by
image/script.c corrupts memory, since image/embedded.c omitted the call
to register_image().

This is the first bug fixed using Stefan Hajnoczi's gdb stub for gPXE.
tags/v0.9.4
Michael Brown 16 years ago
parent
commit
d615b00443
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      src/image/embedded.c

+ 1
- 0
src/image/embedded.c View File

@@ -39,6 +39,7 @@ struct image *embedded_image(void)
39 39
 		return image = NULL;
40 40
 	}
41 41
 	copy_to_user(image->data, 0, _embedded_image_start, eisize);
42
+	register_image(image);
42 43
 
43 44
 	/* Reclaim embedded image memory */
44 45
 	reclaimed = 1;

Loading…
Cancel
Save