Assemble: fix redundant memory free
PATCH 1/1 Assemble: fix redundant memory free
Commit e9fb93af0f76 ("Fix memory leak in file Assemble") fixes few memory leaks in Assemble, but it introduces problem with assembling RAID volume. It was caused by clearing metadata too fast, not only on fail in select_devices() function.
This commit removes redundant memory free.
--- Assemble.c | 2 -- 1 file changed, 2 deletions(-)
Assemble.c +0 -2
@@ -428,8 +428,6 @@ static int select_devices(struct mddev_dev *devlist,/* make sure we finished the loop */ tmpdev =NULL ; -free (st); - st =NULL ; goto loop; }else { content = *contentp;
Signature · 1 line
2.26.2
Quoted 17 lines · On Tue, 12 Sep 2023 04:27:01 +0200 Kinga Tanska <[email protected]> wrote:
Commit
e9fb93af0f76("Fix memory leak in file Assemble") fixes few memory leaks in Assemble, but it introduces problem with assembling RAID volume. It was caused by clearing metadata too fast, not only on fail inselect_devices()function.
This commit removes redundant memory free.Signed-off-by Kinga Tanska <[email protected]>--- Assemble.c | 2 -- 1 file changed, 2 deletions(-)Assemble.c +0
-0
Assemble.c static int select_devices(struct mddev_dev *devlist, · line 433
Quoted 8 lines
Assemble.c +0
-2@@ -428,8 +428,6 @@ static int select_devices(struct mddev_dev *devlist,/* make sure we finished the loop */ tmpdev =NULL ; -free (st); - st =NULL ; goto loop; }else { content = *contentp;
Hi Jes,
It is a regression. Please merge it ASAP, it broke a a lot of our tests.
Thanks,
Mariusz
Jes Sorensen
AppliedQuoted 21 lines · Mariusz Tkaczyk
Quoted 18 lines · On Tue, 12 Sep 2023 04:27:01 +0200 Kinga Tanska <[email protected]> wrote:
Commit
e9fb93af0f76("Fix memory leak in file Assemble") fixes few memory leaks in Assemble, but it introduces problem with assembling RAID volume. It was caused by clearing metadata too fast, not only on fail inselect_devices()function.
This commit removes redundant memory free.Signed-off-by Kinga Tanska <[email protected]>--- Assemble.c | 2 -- 1 file changed, 2 deletions(-)Assemble.c +0
-0@@ -428,8 +428,6 @@ static int select_devices(struct mddev_dev *devlist,
Quoted 10 lines
Assemble.c static int select_devices(struct mddev_dev *devlist, · line 433
Quoted 7 lines
Assemble.c +0
-2/* make sure we finished the loop */ tmpdev =NULL ; -free (st); - st =NULL ; goto loop; }else { content = *contentp;Hi Jes,
It is a regression. Please merge it ASAP, it broke a a lot of our tests.
Applied!
Sorry for missing this.
Thanks,
Jes