diff options
author | Justus Winter <[email protected]> | 2017-01-10 14:42:27 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2017-01-10 14:42:27 +0000 |
commit | 1f5caf90bfaaaf7b9d8c06c12087aeeae3748032 (patch) | |
tree | ebf14139e683a855225744a0a86422bc0e1eadd2 /tools/gpgconf.c | |
parent | tests: Add test for gpgconf. (diff) | |
download | gnupg-1f5caf90bfaaaf7b9d8c06c12087aeeae3748032.tar.gz gnupg-1f5caf90bfaaaf7b9d8c06c12087aeeae3748032.zip |
tools: Fix memory leaks and improve error handling.
* tools/gpgconf-comp.c (gc_option_free): New function.
(gc_components_free): Likewise.
(gc_components_init): Likewise.
(retrieve_options_from_program): Use 'xfree', fix memory leak.
(change_options_program): Improve error handling.
(gc_component_change_options): Fix memory leaks.
* tools/gpgconf.c (main): Initialize components.
* tools/gpgconf.h (gc_components_init): New prototype.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | tools/gpgconf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/gpgconf.c b/tools/gpgconf.c index af65424e0..a1034e663 100644 --- a/tools/gpgconf.c +++ b/tools/gpgconf.c @@ -470,6 +470,7 @@ main (int argc, char **argv) /* Make sure that our subsystems are ready. */ i18n_init(); init_common_subsystems (&argc, &argv); + gc_components_init (); /* Parse the command line. */ pargs.argc = &argc; |