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.
1 file changed