mirror of
git://sourceware.org/git/lvm2.git
synced 2025-04-01 18:50:41 +03:00
clang: call alloca with non-zero size
Make sure that some non 0 size is also for (mirrors == 0).
This commit is contained in:
parent
05f1e78f3e
commit
8bdc234348
@ -1627,7 +1627,7 @@ static int _form_mirror(struct cmd_context *cmd, struct alloc_handle *ah,
|
||||
/*
|
||||
* create mirror image LVs
|
||||
*/
|
||||
img_lvs = alloca(sizeof(*img_lvs) * mirrors);
|
||||
img_lvs = alloca(sizeof(*img_lvs) * (mirrors + 1));
|
||||
memset(img_lvs, 0, sizeof(*img_lvs) * mirrors);
|
||||
|
||||
if (!_create_mimage_lvs(ah, mirrors, stripes, stripe_size, lv, img_lvs, log))
|
||||
|
Loading…
x
Reference in New Issue
Block a user