]> git.ipfire.org Git - thirdparty/kmod.git/commit
depmod: fix asserting mod->kmod == NULL
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Fri, 16 Nov 2012 14:05:42 +0000 (12:05 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Fri, 16 Nov 2012 14:05:42 +0000 (12:05 -0200)
commit02c64df3c2b33880b18d3f4aba9fa8e48e5ca904
tree7acf1e04731eeaed6e6b5bea7290de1bb2c9960e
parent06294621a944e4611e15ce8201df80870e052e7d
depmod: fix asserting mod->kmod == NULL

If we are replacing a lower priority module (due to its location), we
already created a kmod_module, but didn't open the file for reading its
symbols. This means mod->kmod won't be NULL, and this is just ok. Since
all the functions freeing stuff below the previous assert already takes
NULL into consideration, it's safe to just unref mod->kmod and let the
right thing happens.
tools/depmod.c