summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorJimmy Yang <jimmy.yang@oracle.com>2010-07-08 00:05:59 -0700
committerJimmy Yang <jimmy.yang@oracle.com>2010-07-08 00:05:59 -0700
commita8f71eb38138ee0f1dc23b1eb404006dccf1ec24 (patch)
treefb06511dc8c1253df4dcef028b39c9867cf25ac7 /storage
parent3ff4ccd14b44120be231a213855f780f4bfd491a (diff)
downloadmariadb-git-a8f71eb38138ee0f1dc23b1eb404006dccf1ec24.tar.gz
Fix Bug #54764 memory allocated in os_aio_array_create is not
freed at shutdown rb://395, approved by Sunny Bains
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/os/os0file.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/storage/innobase/os/os0file.c b/storage/innobase/os/os0file.c
index c07f8f4bf95..0045b8731e4 100644
--- a/storage/innobase/os/os0file.c
+++ b/storage/innobase/os/os0file.c
@@ -3233,6 +3233,9 @@ os_aio_array_create(
#endif
#if defined(LINUX_NATIVE_AIO)
+ array->aio_ctx = NULL;
+ array->aio_events = NULL;
+
/* If we are not using native aio interface then skip this
part of initialization. */
if (!srv_use_native_aio) {
@@ -3313,6 +3316,13 @@ os_aio_array_free(
os_event_free(array->not_full);
os_event_free(array->is_empty);
+#if defined(LINUX_NATIVE_AIO)
+ if (srv_use_native_aio) {
+ ut_free(array->aio_events);
+ ut_free(array->aio_ctx);
+ }
+#endif /* LINUX_NATIVE_AIO */
+
ut_free(array->slots);
ut_free(array);
}