Browse Source

Fix incorrect error handling when opening a file.

The recently modified gpgutil_open_file function did not
correctly check whether a file was successfully open or not.
master
parent
commit
be3996a8c7
  1. 2
      src/gpgutil.c

2
src/gpgutil.c

@ -63,7 +63,7 @@ gpgutil_open_file(const char *name,
file->file = fopen(name, mode);
else
file->file = tmpfile();
if ( ! file )
if ( ! file->file )
gerr = gpgme_error_from_errno(errno);
if ( ! gerr )

Loading…
Cancel
Save