Date: Fri, 8 Oct 2021 06:10:31 GMT From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 51b4c4751acd - stable/12 - vdev_read_pad2: freeing wrong pointer Message-ID: <202110080610.1986AVZD006826@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=51b4c4751acd3730b1ce0c8fa937f51beacde920 commit 51b4c4751acd3730b1ce0c8fa937f51beacde920 Author: Toomas Soome <tsoome@FreeBSD.org> AuthorDate: 2020-02-05 05:42:42 +0000 Commit: Kyle Evans <kevans@FreeBSD.org> CommitDate: 2021-10-08 02:41:17 +0000 vdev_read_pad2: freeing wrong pointer Shoud free previously allocated tmp buffer instead. Issue introduced in r357497. (cherry picked from commit a1746b25837c2df4367eed7e8c3665e26e0dc6bb) --- stand/i386/zfsboot/zfsboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/i386/zfsboot/zfsboot.c b/stand/i386/zfsboot/zfsboot.c index c6b69867b0f4..e5da51b13b7d 100644 --- a/stand/i386/zfsboot/zfsboot.c +++ b/stand/i386/zfsboot/zfsboot.c @@ -337,7 +337,7 @@ vdev_read_pad2(vdev_t *vdev, char *buf, size_t size) rc = vdev_read_phys(vdev, &bp, tmp, off, 0); if (rc == 0) memcpy(buf, tmp, size); - free(buf); + free(tmp); return (rc); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110080610.1986AVZD006826>