From a6b6f888b524de8d4917ab502db43734d2c5b5ed Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Tue, 12 Dec 2017 19:26:19 +0000 Subject: [PATCH] Free load_opt_buf after we're done with it. CID: 1383607 Sponsored by: Netflix --- usr.sbin/efibootmgr/efibootmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/efibootmgr/efibootmgr.c b/usr.sbin/efibootmgr/efibootmgr.c index 4eb1b644e07c..95bb18a6f431 100644 --- a/usr.sbin/efibootmgr/efibootmgr.c +++ b/usr.sbin/efibootmgr/efibootmgr.c @@ -684,8 +684,9 @@ make_boot_var(const char *label, const char *loader, const char *kernel, const c new_ent->name = bootvar; new_ent->guid = EFI_GLOBAL_GUID; LIST_INSERT_HEAD(&efivars, new_ent, entries); - + free(load_opt_buf); free(dp); + return 0; }