[Commits] Rev 4594: Fix valgrind warning: do free sec_key_tuple, sec_key_packed_tuple in file:///home/psergey/dev2/mysql-5.6-leveldb/

Sergey Petrunya psergey at askmonty.org
Wed Feb 6 18:12:10 EET 2013


At file:///home/psergey/dev2/mysql-5.6-leveldb/

------------------------------------------------------------
revno: 4594
revision-id: psergey at askmonty.org-20130206161208-el5wrruvdz7krsp9
parent: psergey at askmonty.org-20130206142615-mzp7p1m169dx2tu2
committer: Sergey Petrunya <psergey at askmonty.org>
branch nick: mysql-5.6-leveldb
timestamp: Wed 2013-02-06 20:12:08 +0400
message:
  Fix valgrind warning: do free sec_key_tuple, sec_key_packed_tuple
=== modified file 'storage/leveldb/ha_leveldb.cc'
--- a/storage/leveldb/ha_leveldb.cc	2013-02-06 14:26:15 +0000
+++ b/storage/leveldb/ha_leveldb.cc	2013-02-06 16:12:08 +0000
@@ -670,6 +670,7 @@ static handler* leveldb_create_handler(h
 ha_leveldb::ha_leveldb(handlerton *hton, TABLE_SHARE *table_arg)
   : handler(hton, table_arg), scan_it(NULL), pk_descr(NULL), 
     key_descr(NULL), pk_tuple(NULL), pk_packed_tuple(NULL), 
+    sec_key_tuple(NULL), sec_key_packed_tuple(NULL),
     timeout_sec(1), lock_rows(FALSE),
     keyread_only(FALSE)
 {}
@@ -884,6 +885,14 @@ int ha_leveldb::close(void)
     my_free(pk_packed_tuple);
   pk_packed_tuple= NULL;
   
+  if (sec_key_tuple)
+    my_free(sec_key_tuple);
+  sec_key_tuple= NULL;
+  
+  if (sec_key_packed_tuple)
+    my_free(sec_key_packed_tuple);
+  sec_key_packed_tuple= NULL;
+  
   DBUG_RETURN(free_share(share));
 }
 



More information about the commits mailing list