mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Fix realloc usage. Fixes bug#1163.
This commit is contained in:
parent
651b5eeda2
commit
56680123a6
2 changed files with 9 additions and 1 deletions
|
@ -361,13 +361,14 @@ read_trustfiles (void)
|
|||
ti = xtryrealloc (table, (tableidx?tableidx:1) * sizeof *table);
|
||||
if (!ti)
|
||||
{
|
||||
err = gpg_error_from_syserror ();
|
||||
xfree (table);
|
||||
return err;
|
||||
}
|
||||
|
||||
lock_trusttable ();
|
||||
xfree (trusttable);
|
||||
trusttable = table;
|
||||
trusttable = ti;
|
||||
trusttablesize = tableidx;
|
||||
unlock_trusttable ();
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue