summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/valgrind.supp9
-rw-r--r--storage/maria/ma_check.c14
-rw-r--r--storage/maria/ma_crypt.c3
3 files changed, 13 insertions, 13 deletions
diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp
index a9e1a9e9d8e..9a3301900ae 100644
--- a/mysql-test/valgrind.supp
+++ b/mysql-test/valgrind.supp
@@ -1278,6 +1278,15 @@
}
{
+ vasprintf in OpenSuse 12.3
+ Memcheck:Leak
+ fun:malloc
+ fun:vasprintf
+ fun:asprintf
+ fun:dlerror
+}
+
+{
GitHub codership/galera#308
Memcheck:Leak
match-leak-kinds: definite
diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c
index b517588f959..5035df26b18 100644
--- a/storage/maria/ma_check.c
+++ b/storage/maria/ma_check.c
@@ -6635,17 +6635,6 @@ static void copy_data_file_state(MARIA_STATE_INFO *to,
}
-/* Return 1 if block is full of zero's */
-
-static my_bool zero_filled_block(uchar *tmp, uint length)
-{
- while (length--)
- if (*(tmp++) != 0)
- return 0;
- return 1;
-}
-
-
/*
Read 'safely' next record while scanning table.
@@ -6753,8 +6742,7 @@ read_next_page:
sometimes be found at end of a bitmap when we wrote a big
record last that was moved to the next bitmap.
*/
- if (!zero_filled_block(info->scan.page_buff, share->block_size) ||
- _ma_check_bitmap_data(info, UNALLOCATED_PAGE, 0,
+ if (_ma_check_bitmap_data(info, UNALLOCATED_PAGE, 0,
_ma_bitmap_get_page_bits(info,
&share->bitmap,
page)))
diff --git a/storage/maria/ma_crypt.c b/storage/maria/ma_crypt.c
index da82a1a37c8..cc605d79933 100644
--- a/storage/maria/ma_crypt.c
+++ b/storage/maria/ma_crypt.c
@@ -416,7 +416,10 @@ static my_bool ma_crypt_index_pre_write_hook(PAGECACHE_IO_HOOK_ARGS *args)
/* 2 - encrypt page */
if (ma_encrypt(share, share->crypt_data,
src + head, dst + head, size, pageno, lsn, &key_version))
+ {
+ my_free(crypt_buf);
return 1;
+ }
/* 3 - copy tail */
memcpy(dst + block_size - tail, src + block_size - tail, tail);
/* 4 - store key version */