Close /sys/module/$NAME directory if opening /proc/module fails.

This commit is contained in:
Leandro Pereira 2014-04-28 21:04:48 -03:00 committed by Lucas De Marchi
parent c1bc88c98e
commit 30bfd48aef

View File

@ -1802,6 +1802,7 @@ KMOD_EXPORT long kmod_module_get_size(const struct kmod_module *mod)
int err = -errno;
ERR(mod->ctx,
"could not open /proc/modules: %s\n", strerror(errno));
close(dfd);
return err;
}