In the Linux kernel, the following vulnerability has been resolved:
md/raid10: fix memleak for conf->bio_split
In the error path of raid10_run(), conf need be freed, however, conf->bio_split is missed and memory will be leaked.
Since there are 3 places to free conf, factor out a helper to fix the problem.