diff options
author | Andre Heinecke <[email protected]> | 2018-08-28 06:05:30 +0000 |
---|---|---|
committer | Andre Heinecke <[email protected]> | 2018-08-28 06:05:46 +0000 |
commit | 7d3c13df263ed88c17005920e75e0486abeae5b9 (patch) | |
tree | 123983c20a0c56692ba5f4860122ab2c4d1536ac /src/gpgme-json.c | |
parent | js: small documentation update (diff) | |
download | gpgme-7d3c13df263ed88c17005920e75e0486abeae5b9.tar.gz gpgme-7d3c13df263ed88c17005920e75e0486abeae5b9.zip |
json: Allow NULL request in encode and chunk
* src/gpgme-json.c (encode_and_chunk): Don't error on NULL
request.
--
This fixes the error that is passed when parthing the json
object failed and request would be NULL.
Instead of the JSON parser error it would otherwise report
that encode and chunk failed.
Diffstat (limited to 'src/gpgme-json.c')
-rw-r--r-- | src/gpgme-json.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gpgme-json.c b/src/gpgme-json.c index 8812024c..0d1ec508 100644 --- a/src/gpgme-json.c +++ b/src/gpgme-json.c @@ -1521,7 +1521,7 @@ encode_and_chunk (cjson_t request, cjson_t response) { char *data; gpg_error_t err = 0; - size_t chunksize; + size_t chunksize = 0; char *getmore_request = NULL; if (opt_interactive) @@ -1537,7 +1537,6 @@ encode_and_chunk (cjson_t request, cjson_t response) if (!request) { - err = GPG_ERR_INV_VALUE; goto leave; } |