commit | 0fddbf7a07fa4d6501e7a2fcf2b058325affba57 | [log] [tgz] |
---|---|---|
author | Erwan Velu <erwan@enovance.com> | Mon Jul 22 23:46:10 2013 +0200 |
committer | Erwan Velu <erwan@enovance.com> | Mon Jul 22 23:47:05 2013 +0200 |
tree | f033bfbe2ceee30fb84f81b77abfde061f5817a6 | |
parent | ee0ccb794be1d3c677e2c02b416a8702d59811d7 [diff] [blame] |
core: Don't leak memory if error is unknown If error is unknown, the "return 1" call was not freeing error which was malloced at the beginning of the function.
diff --git a/options.c b/options.c index 6462c67..1c44f42 100644 --- a/options.c +++ b/options.c
@@ -271,6 +271,7 @@ if (!error[i]) { log_err("Unknown error %s, please use number value \n", fname); + free(error); return 1; } i++;