Browse Source

[prefix] Eliminate uninitialised variable

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 years ago
parent
commit
b4bb39909e
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      src/arch/i386/core/runtime.c

+ 2
- 0
src/arch/i386/core/runtime.c View File

193
 	if ( ! image ) {
193
 	if ( ! image ) {
194
 		DBGC ( colour, "RUNTIME could not allocate image for "
194
 		DBGC ( colour, "RUNTIME could not allocate image for "
195
 		       "initrd\n" );
195
 		       "initrd\n" );
196
+		rc = -ENOMEM;
196
 		goto err_alloc_image;
197
 		goto err_alloc_image;
197
 	}
198
 	}
198
 	image_set_name ( image, "<INITRD>" );
199
 	image_set_name ( image, "<INITRD>" );
202
 	if ( ! image->data ) {
203
 	if ( ! image->data ) {
203
 		DBGC ( colour, "RUNTIME could not allocate %zd bytes for "
204
 		DBGC ( colour, "RUNTIME could not allocate %zd bytes for "
204
 		       "initrd\n", initrd_len );
205
 		       "initrd\n", initrd_len );
206
+		rc = -ENOMEM;
205
 		goto err_umalloc;
207
 		goto err_umalloc;
206
 	}
208
 	}
207
 	image->len = initrd_len;
209
 	image->len = initrd_len;

Loading…
Cancel
Save