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 <mahrens@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: João Carlos Mendes Luís <jonny@jonny.eng.br> Closes openzfs#10193 (cherry picked from commit 75c6201)
- Loading branch information