boot: pxe: Init initrd_str in label_boot()

When 'bootflow read' is used to read images, initrd_str is not inited
before strdup() is called. Note that this is only used by developers.

Set the variable to an empty string to start.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-08-07 04:37:15 -06:00
parent e385bac1b6
commit cbe563ed8b

View File

@@ -642,7 +642,7 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
char *kernel_addr = NULL;
char *initrd_addr_str = NULL;
char initrd_filesize[10];
char initrd_str[28];
char initrd_str[28] = "";
char mac_str[29] = "";
char ip_str[68] = "";
char *fit_addr = NULL;