Commit d54157f0 authored by bar@mysql.com's avatar bar@mysql.com

ha_archive.cc:

  Memory was used after it has been alreay freed.
  This led to server crash on FreeBSD.
parent e7348d51
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment