mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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 <justus@g10code.com>
This commit is contained in:
parent
c8cfc62125
commit
1f5caf90bf
3 changed files with 52 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue