summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
diff options
context:
space:
mode:
authorunknown <antony@ppcg5.local>2007-03-28 21:29:16 -0700
committerunknown <antony@ppcg5.local>2007-03-28 21:29:16 -0700
commit212ba963f2a160df9ac5be747a5c32741f81803a (patch)
tree614efd391bffdfd696afac5ccb537757bb235ee2 /sql/ha_partition.cc
parenteac12b6587c53d34f0241c404fb0ce8c5ee0da93 (diff)
downloadmariadb-git-212ba963f2a160df9ac5be747a5c32741f81803a.tar.gz
WL#2936
"Plugin Server Variables" Post review cleanups. include/mysql/plugin.h: WL2936 post review clean up fix macros to ensure correct type declarations sql/ha_partition.cc: WL2936 post review clean up add in missing my_afree() sql/handler.cc: WL2936 post review clean up remove stray semicolon sql/sql_plugin.cc: WL2936 post review clean up fixup comments and debug code storage/innobase/handler/ha_innodb.cc: WL2936 Include some of Marko Mäkelä's patches storage/innobase/handler/ha_innodb.h: WL2936 Include some of Marko Mäkelä's patches
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r--sql/ha_partition.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index d8fd3b5f934..d37fcea339b 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -2173,7 +2173,7 @@ bool ha_partition::get_from_handler_file(const char *name, MEM_ROOT *mem_root)
address_tot_name_len= file_buffer + 12 + 4 * tot_partition_words;
tot_name_words= (uint4korr(address_tot_name_len) + 3) / 4;
if (len_words != (tot_partition_words + tot_name_words + 4))
- goto err2;
+ goto err3;
name_buffer_ptr= file_buffer + 16 + 4 * tot_partition_words;
VOID(my_close(file, MYF(0)));
m_file_buffer= file_buffer; // Will be freed in clear_handler_file()
@@ -2181,10 +2181,12 @@ bool ha_partition::get_from_handler_file(const char *name, MEM_ROOT *mem_root)
if (!(m_engine_array= (plugin_ref*)
my_malloc(m_tot_parts * sizeof(plugin_ref), MYF(MY_WME))))
- goto err2;
+ goto err3;
for (i= 0; i < m_tot_parts; i++)
m_engine_array[i]= ha_lock_engine(NULL, engine_array[i]);
+
+ my_afree((gptr) engine_array);
if (!m_file && create_handlers(mem_root))
{
@@ -2193,6 +2195,8 @@ bool ha_partition::get_from_handler_file(const char *name, MEM_ROOT *mem_root)
}
DBUG_RETURN(FALSE);
+err3:
+ my_afree((gptr) engine_array);
err2:
my_free(file_buffer, MYF(0));
err1: