1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Fix usage of realloc.

This commit is contained in:
Werner Koch 2009-12-02 19:00:10 +00:00
parent 9e83404751
commit edd95da365
2 changed files with 9 additions and 1 deletions

View file

@ -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;