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
@ -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 New Issue
Block a user