[Commits] 9279dd1d9a5: Fix fil_space_release() leaks.

jan jan.lindstrom at mariadb.com
Wed Mar 22 09:21:27 EET 2017


revision-id: 9279dd1d9a51ca08d0a3d1244120f84c753a23bc (mariadb-10.1.22-9-g9279dd1d9a5)
parent(s): 3c9f57c54732c0fc3336f0201e4e0a79f20b7a78
author: Jan Lindström
committer: Jan Lindström
timestamp: 2017-03-22 09:21:08 +0200
message:

Fix fil_space_release() leaks.

---
 storage/innobase/buf/buf0buf.cc   | 1 +
 storage/innobase/row/row0merge.cc | 1 +
 storage/xtradb/buf/buf0buf.cc     | 2 ++
 storage/xtradb/row/row0merge.cc   | 1 +
 4 files changed, 5 insertions(+)

diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index 93aba2da0da..27a13385c32 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -6252,6 +6252,7 @@ buf_page_decrypt_after_read(
 			decrypt. */
 			if (!fil_space_verify_crypt_checksum(dst_frame,
 					zip_size, NULL, bpage->offset)) {
+				fil_space_release(space);
 				return (false);
 			}
 
diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc
index 0906ec6e8ae..7d88702a441 100644
--- a/storage/innobase/row/row0merge.cc
+++ b/storage/innobase/row/row0merge.cc
@@ -4002,6 +4002,7 @@ row_merge_build_indexes(
 			os_mem_alloc_large(&block_size));
 
 		if (crypt_block == NULL) {
+			fil_space_release(space);
 			DBUG_RETURN(DB_OUT_OF_MEMORY);
 		}
 	} else {
diff --git a/storage/xtradb/buf/buf0buf.cc b/storage/xtradb/buf/buf0buf.cc
index 236ee46831f..4ecae875c83 100644
--- a/storage/xtradb/buf/buf0buf.cc
+++ b/storage/xtradb/buf/buf0buf.cc
@@ -6410,6 +6410,7 @@ buf_page_decrypt_after_read(
 			decrypt. */
 			if (!fil_space_verify_crypt_checksum(dst_frame,
 					zip_size, NULL, bpage->offset)) {
+				fil_space_release(space);
 				return (false);
 			}
 
@@ -6461,5 +6462,6 @@ buf_page_decrypt_after_read(
 	}
 
 	fil_space_release(space);
+
 	return (success);
 }
diff --git a/storage/xtradb/row/row0merge.cc b/storage/xtradb/row/row0merge.cc
index f57490ed7be..71a31ff28a6 100644
--- a/storage/xtradb/row/row0merge.cc
+++ b/storage/xtradb/row/row0merge.cc
@@ -4005,6 +4005,7 @@ row_merge_build_indexes(
 			os_mem_alloc_large(&block_size));
 
 		if (crypt_block == NULL) {
+			fil_space_release(space);
 			DBUG_RETURN(DB_OUT_OF_MEMORY);
 		}
 	} else {


More information about the commits mailing list