[PATCH 3/4] * Free "list"'s in dirmnger/server.c to avoid memory leak.

Joshua Rogers git at internot.info
Sun Dec 21 19:21:30 CET 2014


In two instances, 'list' was never freed in server.c
---
 dirmngr/server.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dirmngr/server.c b/dirmngr/server.c
index 58e4b64..ca1be95 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -1607,6 +1607,7 @@ cmd_ks_search (assuan_context_t ctx, char *line)
     }
 
  leave:
+  free_strlist (list);
   return leave_cmd (ctx, err);
 }
 
@@ -1666,7 +1667,7 @@ cmd_ks_get (assuan_context_t ctx, char *line)
       err = ks_action_get (ctrl, list, outfp);
       es_fclose (outfp);
     }
-
+  free_strlist (list);
  leave:
   return leave_cmd (ctx, err);
 }
-- 
1.9.1




More information about the Gnupg-devel mailing list