Commit dca96790 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

fix memory leaks

git-svn-id: file:///svn/mysql/tokudb-engine/src@5727 c7de825b-a66e-492c-adef-691d508d4ae1
parent 9d4d6b5b
...@@ -2068,6 +2068,8 @@ int ha_tokudb::get_status() { ...@@ -2068,6 +2068,8 @@ int ha_tokudb::get_status() {
} }
else if (error == 0 && value.size == sizeof(share->version)) { else if (error == 0 && value.size == sizeof(share->version)) {
share->version = *(uint *)value.data; share->version = *(uint *)value.data;
free(value.data);
value.data = NULL;
} }
else { else {
goto cleanup; goto cleanup;
...@@ -2088,6 +2090,8 @@ int ha_tokudb::get_status() { ...@@ -2088,6 +2090,8 @@ int ha_tokudb::get_status() {
} }
else if (error == 0 && value.size == sizeof(share->version)) { else if (error == 0 && value.size == sizeof(share->version)) {
share->capabilities= *(uint *)value.data; share->capabilities= *(uint *)value.data;
free(value.data);
value.data = NULL;
} }
else { else {
goto cleanup; goto cleanup;
...@@ -4299,6 +4303,8 @@ void ha_tokudb::init_auto_increment() { ...@@ -4299,6 +4303,8 @@ void ha_tokudb::init_auto_increment() {
if (error == 0 && value.size == sizeof(share->last_auto_increment)) { if (error == 0 && value.size == sizeof(share->last_auto_increment)) {
share->last_auto_increment = *(uint *)value.data; share->last_auto_increment = *(uint *)value.data;
free(value.data);
value.data = NULL;
} }
else { else {
share->last_auto_increment = 0; share->last_auto_increment = 0;
...@@ -4319,6 +4325,8 @@ void ha_tokudb::init_auto_increment() { ...@@ -4319,6 +4325,8 @@ void ha_tokudb::init_auto_increment() {
if (error == 0 && value.size == sizeof(share->auto_inc_create_value)) { if (error == 0 && value.size == sizeof(share->auto_inc_create_value)) {
share->auto_inc_create_value = *(uint *)value.data; share->auto_inc_create_value = *(uint *)value.data;
free(value.data);
value.data = NULL;
} }
else { else {
share->auto_inc_create_value = 0; share->auto_inc_create_value = 0;
......
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