]> git.ipfire.org Git - thirdparty/mdadm.git/commit - Assemble.c
Fix possible NULL ptr dereferences and memory leaks
authorMateusz Grzonka <mateusz.grzonka@intel.com>
Mon, 13 Jun 2022 09:59:34 +0000 (11:59 +0200)
committerJes Sorensen <jsorensen@fb.com>
Tue, 14 Jun 2022 14:41:42 +0000 (10:41 -0400)
commit626bc45396c4959f2c4685c2faa7c4f553f4efdf
tree44cea41771402fc64ffd2280e95d786d64ed3b1b
parentf5ff2988761625b43eb15555993f2797af29f166
Fix possible NULL ptr dereferences and memory leaks

In Assemble there was a NULL check for sra variable,
which effectively didn't stop the execution in every case.
That might have resulted in a NULL pointer dereference.

Also in super-ddf, mu variable was set to NULL for some condition,
and then immidiately dereferenced.
Additionally some memory wasn't freed as well.

Signed-off-by: Mateusz Grzonka <mateusz.grzonka@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Assemble.c
super-ddf.c