]> git.ipfire.org Git - thirdparty/kmod.git/commit
depmod: fix leak in case of malloc(0)
authorLucas De Marchi <lucas.demarchi@intel.com>
Thu, 26 Feb 2015 06:38:52 +0000 (03:38 -0300)
committerLucas De Marchi <lucas.demarchi@intel.com>
Thu, 26 Feb 2015 06:40:47 +0000 (03:40 -0300)
commita1bec0dfdb53774fbc9e0f082a85562a5a9b02e2
tree0a53da6e49f371ff852394bd8e7dca2c5c8c18d0
parent0bcdef97009a99fb9ef8426e3fef72b69f0dd156
depmod: fix leak in case of malloc(0)

malloc(0) can return != NULL. We need to pass the pointer to free().
This happens if index__haschildren(node) returned true, but
child_count is set to 0.
tools/depmod.c