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

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