Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libkmod: Fix memory leak on error path
If realloc fails, do not override the still valid pointer with NULL. Otherwise freeing the iterator won't free the previously allocated buffer. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Link: #82 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
- Loading branch information