]> www.infradead.org Git - users/hch/misc.git/commitdiff
dpll: zl3073x: Fix double free in zl3073x_devlink_flash_update()
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 25 Sep 2025 13:28:13 +0000 (16:28 +0300)
committerJakub Kicinski <kuba@kernel.org>
Fri, 26 Sep 2025 22:23:55 +0000 (15:23 -0700)
The zl3073x_devlink_flash_prepare() function calls zl3073x_fw_free() and
the caller, zl3073x_devlink_flash_update(), also calls that same free
function so it leads to a double free.  Delete the extra free.

Fixes: a1e891fe4ae8 ("dpll: zl3073x: Implement devlink flash callback")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/aNVDbcIQq4RmU_fl@stanley.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/dpll/zl3073x/devlink.c

index f55d5309d4f9cf975ca077feb2861acf6ce1ef09..ccc22332b3463b8e1ccc9d58ad57f479a1328758 100644 (file)
@@ -167,7 +167,6 @@ zl3073x_devlink_flash_prepare(struct zl3073x_dev *zldev,
                zl3073x_devlink_flash_notify(zldev,
                                             "Utility is missing in firmware",
                                             NULL, 0, 0);
-               zl3073x_fw_free(zlfw);
                return -ENOEXEC;
        }