ha_archive.cc:

Memory was used after it has been alreay freed.
  This led to server crash on FreeBSD.


sql/examples/ha_archive.cc:
  Memory was used after it has been alreay freed.
  This led to server crash on FreeBSD.
This commit is contained in:
unknown 2004-07-07 13:47:29 +05:00
parent 8ce9725e53
commit 4e95ea7b6e

View File

@ -188,9 +188,9 @@ static int free_share(ARCHIVE_SHARE *share)
hash_delete(&archive_open_tables, (byte*) share);
thr_lock_delete(&share->lock);
pthread_mutex_destroy(&share->mutex);
my_free((gptr) share, MYF(0));
if (gzclose(share->archive_write) == Z_ERRNO)
rc= -1;
my_free((gptr) share, MYF(0));
}
pthread_mutex_unlock(&archive_mutex);