[PATCH gnupg] agent: Fix a memory leak
Sorah Fukumori
her at sorah.jp
Mon Jan 13 13:28:13 CET 2025
* 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 <her at sorah.jp>
---
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
More information about the Gnupg-devel
mailing list