]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
xilinx: zynqmp: Free allocated field for target variable
authorMichal Simek <michal.simek@xilinx.com>
Wed, 28 Jul 2021 10:46:39 +0000 (12:46 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 6 Aug 2021 07:32:02 +0000 (09:32 +0200)
When env_set() is called there is no need to allocate memory for variable
which is already saved that's why free it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
board/xilinx/zynqmp/zynqmp.c

index 38c910fa5bab458f51ff76a1b785679c06b7ba8d..2cb97f42bec37311e5c2df018f59b62e18e0e201 100644 (file)
@@ -735,6 +735,7 @@ int board_late_init(void)
                        env_targets ? env_targets : "");
 
        env_set("boot_targets", new_targets);
+       free(new_targets);
 
        reset_reason();