Date: Thu, 19 May 2016 20:51:48 +0000 (UTC) From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300230 - head/sys/boot/fdt Message-ID: <201605192051.u4JKpmRU005588@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gonzo Date: Thu May 19 20:51:47 2016 New Revision: 300230 URL: https://svnweb.freebsd.org/changeset/base/300230 Log: 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 Modified: head/sys/boot/fdt/fdt_loader_cmd.c Modified: head/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- head/sys/boot/fdt/fdt_loader_cmd.c Thu May 19 20:08:16 2016 (r300229) +++ head/sys/boot/fdt/fdt_loader_cmd.c Thu May 19 20:51:47 2016 (r300230) @@ -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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605192051.u4JKpmRU005588>