commit | a07ea0329ca9655531f624b46719984da4604fbc | [log] [tgz] |
---|---|---|
author | Lucas De Marchi <lucas.demarchi@intel.com> | Wed Feb 25 12:06:44 2015 -0300 |
committer | Lucas De Marchi <lucas.demarchi@intel.com> | Wed Feb 25 12:06:44 2015 -0300 |
tree | ff5ff0838076d8c801816b8fea2977ccce865b46 | |
parent | 0b3aef23b8e5cc935caaec6230782553c1a4ca95 [diff] |
depmod: use cleanup attribute to simplify free on exit Reusing the root variable was a bad idea. Doing so we could call free() on a variable that was not allocated. For example: "depmod -b / -h". Since we would jump to cmdline_failed, root would not be duplicated. Instead of fighting the order in the options, just used the cleanup attribute and remove the calls to free() on "config_paths" and "root".