Fixed memory leak in FDT overlay handling code

Free both overlay and new fdt before returning after fdt_open_into error
PR:		209634
Submitted by:	David Binderman
This commit is contained in:
Oleksandr Tymoshenko 2016-05-19 20:51:47 +00:00
parent c76f604ee9
commit 05eb95f283

View File

@ -383,6 +383,8 @@ fdt_apply_overlays()
rv = fdt_open_into(fdtp, new_fdtp, new_fdtp_size);
if (rv != 0) {
printf("failed to open DTB blob for applying overlays\n");
free(new_fdtp);
free(overlay);
return;
}