4482 jonas oreland 2011-08-27
ndb - still memory leak in binlog code if using more than 128 columns...
modified:
sql/ha_ndbcluster_binlog.cc
4481 jonas oreland 2011-08-27
ndb - still memory leak in error case in ha_ndbinfo::open
modified:
sql/ha_ndbinfo.cc
=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc 2011-07-08 12:28:37 +0000
+++ b/sql/ha_ndbcluster_binlog.cc 2011-08-27 12:12:27 +0000
@@ -6299,8 +6299,8 @@ ndb_binlog_thread_handle_data_event(Ndb
MY_BITMAP b;
/* Potential buffer for the bitmap */
uint32 bitbuf[128 / (sizeof(uint32) * 8)];
- bitmap_init(&b, n_fields <= sizeof(bitbuf) * 8 ? bitbuf : NULL,
- n_fields, FALSE);
+ const bool own_buffer = n_fields <= sizeof(bitbuf) * 8;
+ bitmap_init(&b, own_buffer ? bitbuf : NULL, n_fields, FALSE);
bitmap_set_all(&b);
/*
@@ -6463,6 +6463,11 @@ ndb_binlog_thread_handle_data_event(Ndb
my_free(blobs_buffer[1], MYF(MY_ALLOW_ZERO_PTR));
}
+ if (!own_buffer)
+ {
+ bitmap_free(&b);
+ }
+
return 0;
}
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4481 to 4482) | jonas oreland | 29 Aug |