aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpgconf.h
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-01-10 14:42:27 +0000
committerJustus Winter <[email protected]>2017-01-10 14:42:27 +0000
commit1f5caf90bfaaaf7b9d8c06c12087aeeae3748032 (patch)
treeebf14139e683a855225744a0a86422bc0e1eadd2 /tools/gpgconf.h
parenttests: Add test for gpgconf. (diff)
downloadgnupg-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 'tools/gpgconf.h')
-rw-r--r--tools/gpgconf.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/gpgconf.h b/tools/gpgconf.h
index 39d34b6d0..d6d7627aa 100644
--- a/tools/gpgconf.h
+++ b/tools/gpgconf.h
@@ -38,6 +38,10 @@ struct
/*-- gpgconf-comp.c --*/
+
+/* Initialize the components. */
+void gc_components_init (void);
+
/* Percent-Escape special characters. The string is valid until the
next invocation of the function. */
char *gc_percent_escape (const char *src);