summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2007-10-19 10:49:07 +0200
committerWerner Koch <wk@gnupg.org>2007-10-19 10:49:07 +0200
commitbea6c580f25b47cdccb3f088140cb15acbb02e06 (patch)
treea9dbbbb309e4d5109982058f33ecbbfe39ac03aa /tools
parent2007-10-15 Daiki Ueno <ueno@unixuser.org> (wk) (diff)
downloadgnupg2-bea6c580f25b47cdccb3f088140cb15acbb02e06.tar.xz
gnupg2-bea6c580f25b47cdccb3f088140cb15acbb02e06.zip
Fixed bug 842 (segv in gpgconf)
Diffstat (limited to 'tools')
-rw-r--r--tools/ChangeLog5
-rw-r--r--tools/gpgconf-comp.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/tools/ChangeLog b/tools/ChangeLog
index 05951f75e..c42e75c87 100644
--- a/tools/ChangeLog
+++ b/tools/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-19 Werner Koch <wk@g10code.com>
+
+ * gpgconf-comp.c (retrieve_options_from_file): Don't call fclose
+ with NULL. Fixes bug 842.
+
2007-10-12 Werner Koch <wk@g10code.com>
* gpg-connect-agent.c (substitute_line): Allow ${foo} syntax.
diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c
index 0f91edf44..ded646f7b 100644
--- a/tools/gpgconf-comp.c
+++ b/tools/gpgconf-comp.c
@@ -1880,7 +1880,7 @@ retrieve_options_from_file (gc_component_t component, gc_backend_t backend)
list_option->active = 1;
list_option->value = list;
- if (fclose (list_file) && ferror (list_file))
+ if (list_file && fclose (list_file) && ferror (list_file))
gc_error (1, errno, "error closing %s", list_pathname);
xfree (line);
}