Fixed bug 842 (segv in gpgconf)

This commit is contained in:
Werner Koch 2007-10-19 08:49:07 +00:00
parent 917ee1d5fd
commit bea6c580f2
2 changed files with 6 additions and 1 deletions

View File

@ -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.

View File

@ -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);
}