vdev_read_pad2: freeing wrong pointer

Shoud free previously allocated tmp buffer instead. Issue introduced in
r357497.

Reported by:	rpokala
This commit is contained in:
Toomas Soome 2020-02-05 05:42:42 +00:00
parent 0d0883728e
commit a1746b2583
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357567

View file

@ -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);
}