json: Fix memleak in native msging repl

* src/gpgme-json.c (native_messaging_repl): Free request and
response after each loop.

--
If we only accept once request we should not loop. If we loop
we should do it properly.
This commit is contained in:
Andre Heinecke 2018-07-18 13:15:02 +02:00
parent 6d7b4382c3
commit 98a75a16cc
No known key found for this signature in database
GPG Key ID: 2978E9D40CBABA5C

View File

@ -3665,6 +3665,10 @@ native_messaging_repl (void)
log_error ("error writing request: %s\n", gpg_strerror (err));
break;
}
xfree (response);
response = NULL;
xfree (request);
request = NULL;
}
xfree (response);