Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jan 2018 18:08:01 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r328009 - head/stand/fdt
Message-ID:  <201801151808.w0FI81Lt085686@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Mon Jan 15 18:08:01 2018
New Revision: 328009
URL: https://svnweb.freebsd.org/changeset/base/328009

Log:
  stand/fdt: Don't leak next_fdtp if we fail to open overlay
  
  MFC after:	1 week
  X-MFC-With:	r327991

Modified:
  head/stand/fdt/fdt_loader_cmd.c

Modified: head/stand/fdt/fdt_loader_cmd.c
==============================================================================
--- head/stand/fdt/fdt_loader_cmd.c	Mon Jan 15 17:27:43 2018	(r328008)
+++ head/stand/fdt/fdt_loader_cmd.c	Mon Jan 15 18:08:01 2018	(r328009)
@@ -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;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801151808.w0FI81Lt085686>