]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: explicitly return ENOMEM on kmod_module_*_new failure
authorEmil Velikov <emil.l.velikov@gmail.com>
Wed, 4 Jun 2025 16:16:25 +0000 (17:16 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Wed, 11 Jun 2025 13:03:26 +0000 (08:03 -0500)
commit70108351033f3f527d4e4fdd6f20161557554d1e
tree495c8395aa4ecead0fb055cb02179160af75a287
parentd44eb2ffa4a50b9c5c6a269bcfd7cd946c27b045
libkmod: explicitly return ENOMEM on kmod_module_*_new failure

All these functions do is malloc() the respective struct and initialize
the members. The errno can only be ENOMEM, so just return it directly.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/368
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-module.c