documentation bug in GPGME: gpgme_op_import_result() may return NULL on error
authorVolker Birk <vb@pep.foundation>
Tue, 18 Oct 2016 15:51:25 +0200
changeset 1302ea2739aadf09
parent 1300 976804e13602
child 1303 abc64f85ee17
documentation bug in GPGME: gpgme_op_import_result() may return NULL on error
(thank you, Mari Donkers!)
src/pgp_gpg.c
     1.1 --- a/src/pgp_gpg.c	Tue Oct 18 09:56:26 2016 +0200
     1.2 +++ b/src/pgp_gpg.c	Tue Oct 18 15:51:25 2016 +0200
     1.3 @@ -1083,6 +1083,11 @@
     1.4              gpgme_import_result =
     1.5                  gpg.gpgme_op_import_result(session->ctx);
     1.6              assert(gpgme_import_result);
     1.7 +            if (!gpgme_import_result) {
     1.8 +                gpg.gpgme_data_release(dh);
     1.9 +                return PEP_UNKNOWN_ERROR;
    1.10 +            }
    1.11 +
    1.12              gpgme_import_status_t import;
    1.13              for (import = gpgme_import_result->imports; 
    1.14                   import;