[PATCH gnupg] agent: Fix a memory leak

Sorah Fukumori via Gnupg-devel <[email protected]>
Newsgroups gmane.comp.encryption.gpg.devel
Message-ID <[email protected]>
* agent/findkey.c (read_key_file): Free the buffer,
  which were forgotten to be freed at commit 434a641d40c on T6944.
  Otherwise the 'keyinfo --list' agent command gradually leads to
  memory exhaustion.

--

Fixes-commit: 434a641d40cbff82beb9f485e0adca72419bfdf2
Signed-off-by: Sorah Fukumori <[email protected]>
---
 agent/findkey.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/agent/findkey.c b/agent/findkey.c
index 8efb7b320..5b9411c77 100644
--- a/agent/findkey.c
+++ b/agent/findkey.c
@@ -1193,6 +1193,7 @@ read_key_file (ctrl_t ctrl, const unsigned char *grip,
    else
     es_fclose (fp);
   xfree (fname);
+  xfree (buf);
   return err;
 }
 
-- 
2.47.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.