diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c index bd98eed2d..3c6a003f6 100644 --- a/dirmngr/ks-engine-hkp.c +++ b/dirmngr/ks-engine-hkp.c @@ -674,7 +674,7 @@ ks_hkp_mark_host (ctrl_t ctrl, const char *name, int alive) member in another pool. */ for (idx3=0; idx3 < hosttable_size; idx3++) { - if (hosttable[idx3] && hosttable[idx3] + if (hosttable[idx3] && hosttable[idx3]->pool && idx3 != idx && host_in_pool_p (hosttable[idx3]->pool, n)) diff --git a/dirmngr/server.c b/dirmngr/server.c index 9b4cdb243..6094bc9b4 100644 --- a/dirmngr/server.c +++ b/dirmngr/server.c @@ -1586,7 +1586,6 @@ cmd_ks_search (assuan_context_t ctx, char *line) if (!sl) { err = gpg_error_from_syserror (); - free_strlist (list); goto leave; } sl->flags = 0; @@ -1607,6 +1606,7 @@ cmd_ks_search (assuan_context_t ctx, char *line) } leave: + free_strlist (list); return leave_cmd (ctx, err); } @@ -1647,7 +1647,6 @@ cmd_ks_get (assuan_context_t ctx, char *line) if (!sl) { err = gpg_error_from_syserror (); - free_strlist (list); goto leave; } sl->flags = 0; @@ -1668,6 +1667,7 @@ cmd_ks_get (assuan_context_t ctx, char *line) } leave: + free_strlist (list); return leave_cmd (ctx, err); }