Skip to content

Commit 33fa6ab

Browse files
committed
Ensure that map->mutex is reset in my_bitmap_init
1 parent 75dd94c commit 33fa6ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mysys/my_bitmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ my_bool my_bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits,
174174
my_bool thread_safe)
175175
{
176176
DBUG_ENTER("my_bitmap_init");
177+
map->mutex= 0;
177178
if (!buf)
178179
{
179180
uint size_in_bytes= bitmap_buffer_size(n_bits);
@@ -183,7 +184,6 @@ my_bool my_bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits,
183184
size_in_bytes= ALIGN_SIZE(size_in_bytes);
184185
extra= sizeof(mysql_mutex_t);
185186
}
186-
map->mutex= 0;
187187
if (!(buf= (my_bitmap_map*) my_malloc(size_in_bytes+extra, MYF(MY_WME))))
188188
DBUG_RETURN(1);
189189
if (thread_safe)

0 commit comments

Comments
 (0)