Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix allocation errors, detected using ASAN
The test for VDEV_TYPE_INDIRECT is done after a memory allocation, and could return from function without freeing it. Since we don't need that allocation yet, just postpone it. Add a missing free() when buffer is no longer needed. Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: João Carlos Mendes Luís <[email protected]> Closes openzfs#10193 (cherry picked from commit 75c6201)
- Loading branch information