Skip to content
Commit 2e531bc3 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Ulf Hansson
Browse files

memstick/ms_block: Fix some incorrect memory allocation



Some functions of the bitmap API take advantage of the fact that a bitmap
is an array of long.

So, to make sure this assertion is correct, allocate bitmaps with
bitmap_zalloc() instead of kzalloc()+hand-computed number of bytes.

While at it, also use bitmap_free() instead of kfree() to keep the
semantic.

Fixes: 0ab30494 ("memstick: add support for legacy memorysticks")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/dbf633c48c24ae6d95f852557e8d8b3bbdef65fe.1656155715.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 08860404
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment