mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +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);
|
||||
if (rc == 0)
|
||||
memcpy(buf, tmp, size);
|
||||
free(buf);
|
||||
free(tmp);
|
||||
return (rc);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue