summaryrefslogtreecommitdiff
path: root/cmd/pxe.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/pxe.c')
-rw-r--r--cmd/pxe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/pxe.c b/cmd/pxe.c
index 0f26b3b4219..71d8b542b28 100644
--- a/cmd/pxe.c
+++ b/cmd/pxe.c
@@ -64,6 +64,8 @@ static int pxe_dhcp_option_path(struct pxe_context *ctx, unsigned long pxefile_a
int ret = get_pxe_file(ctx, pxelinux_configfile, pxefile_addr_r);
free(pxelinux_configfile);
+ /* set to NULL to avoid double-free if DHCP is tried again */
+ pxelinux_configfile = NULL;
return ret;
}