aboutsummaryrefslogtreecommitdiff
path: root/stand/fdt
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2018-01-15 18:08:01 +0000
committerKyle Evans <kevans@FreeBSD.org>2018-01-15 18:08:01 +0000
commit67a3bb4e341fe0286c44f12ad34310ac3aad6819 (patch)
tree87f241c5b3c1bc7d483d9bfa11f1316d32b701ab /stand/fdt
parent9cd768a17735cba98c4fe80ec76e5bbdcda118c5 (diff)
downloadsrc-67a3bb4e341fe0286c44f12ad34310ac3aad6819.tar.gz
src-67a3bb4e341fe0286c44f12ad34310ac3aad6819.zip
stand/fdt: Don't leak next_fdtp if we fail to open overlay
MFC after: 1 week X-MFC-With: r327991
Notes
Notes: svn path=/head/; revision=328009
Diffstat (limited to 'stand/fdt')
-rw-r--r--stand/fdt/fdt_loader_cmd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/stand/fdt/fdt_loader_cmd.c b/stand/fdt/fdt_loader_cmd.c
index 31fc4b45f659..bd83c102738e 100644
--- a/stand/fdt/fdt_loader_cmd.c
+++ b/stand/fdt/fdt_loader_cmd.c
@@ -383,6 +383,7 @@ fdt_apply_overlays()
}
rv = fdt_open_into(current_fdtp, next_fdtp, next_fdtp_size);
if (rv != 0) {
+ free(next_fdtp);
printf("failed to open base dtb into overlay base\n");
continue;
}