]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: unref in kmod_module_new_from_path() error path
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 3 Oct 2024 15:27:37 +0000 (16:27 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Wed, 9 Oct 2024 03:56:29 +0000 (22:56 -0500)
commit2043c657959b71ffe36efbf5fe2ab27edd4ad246
tree4730121f54a55f962b5e092d28e232f3334f743b
parent824d4d07a421a35936d388f9bad4d583610f0ba4
libkmod: unref in  kmod_module_new_from_path() error path

Preserve the original behaviour, where the module refcount stays the
same, if the function fails.

Fixes: e19338da ("libkmod: Avoid redundant kmod_pool_get_module call")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/171
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-module.c