mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-20 02:38:43 +00:00
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:
parent
0d0883728e
commit
a1746b2583
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357567
@ -337,7 +337,7 @@ vdev_read_pad2(vdev_t *vdev, char *buf, size_t size)
|
|||||||
rc = vdev_read_phys(vdev, &bp, tmp, off, 0);
|
rc = vdev_read_phys(vdev, &bp, tmp, off, 0);
|
||||||
if (rc == 0)
|
if (rc == 0)
|
||||||
memcpy(buf, tmp, size);
|
memcpy(buf, tmp, size);
|
||||||
free(buf);
|
free(tmp);
|
||||||
return (rc);
|
return (rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user