mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
dirmngr: Fix memory leak.
* dirmngr/server.c (cmd_ks_search, cmd_ks_get): Fix memory leak. * dirmngr/ks-engine-hkp.c (ks_hkp_mark_host): Remove double check. -- Reported-by: Joshua Rogers <git@internot.info> Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
0d5cb55402
commit
5a556e4e88
@ -674,7 +674,7 @@ ks_hkp_mark_host (ctrl_t ctrl, const char *name, int alive)
|
|||||||
member in another pool. */
|
member in another pool. */
|
||||||
for (idx3=0; idx3 < hosttable_size; idx3++)
|
for (idx3=0; idx3 < hosttable_size; idx3++)
|
||||||
{
|
{
|
||||||
if (hosttable[idx3] && hosttable[idx3]
|
if (hosttable[idx3]
|
||||||
&& hosttable[idx3]->pool
|
&& hosttable[idx3]->pool
|
||||||
&& idx3 != idx
|
&& idx3 != idx
|
||||||
&& host_in_pool_p (hosttable[idx3]->pool, n))
|
&& host_in_pool_p (hosttable[idx3]->pool, n))
|
||||||
|
@ -1586,7 +1586,6 @@ cmd_ks_search (assuan_context_t ctx, char *line)
|
|||||||
if (!sl)
|
if (!sl)
|
||||||
{
|
{
|
||||||
err = gpg_error_from_syserror ();
|
err = gpg_error_from_syserror ();
|
||||||
free_strlist (list);
|
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
sl->flags = 0;
|
sl->flags = 0;
|
||||||
@ -1607,6 +1606,7 @@ cmd_ks_search (assuan_context_t ctx, char *line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
leave:
|
leave:
|
||||||
|
free_strlist (list);
|
||||||
return leave_cmd (ctx, err);
|
return leave_cmd (ctx, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1647,7 +1647,6 @@ cmd_ks_get (assuan_context_t ctx, char *line)
|
|||||||
if (!sl)
|
if (!sl)
|
||||||
{
|
{
|
||||||
err = gpg_error_from_syserror ();
|
err = gpg_error_from_syserror ();
|
||||||
free_strlist (list);
|
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
sl->flags = 0;
|
sl->flags = 0;
|
||||||
@ -1668,6 +1667,7 @@ cmd_ks_get (assuan_context_t ctx, char *line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
leave:
|
leave:
|
||||||
|
free_strlist (list);
|
||||||
return leave_cmd (ctx, err);
|
return leave_cmd (ctx, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user