Problem:
* Memory leak exists in reconfigure function when multipathd command "reconfigure" is executed.
Reasons:
* The following judgement condition is not satisfied when there is no path , free_pathvec is not called to free the vector of vecs->pathvec:
if (VECTOR_SIZE(vecs->pathvec))
free_pathvec(vecs->pathvec, FREE_PATHS);
* Then the vecs->pathvec is set to NULL, so the vector memory which vecs->pathvec pointed to is leaked:
vecs->pathvec = NULL;
Please review the solutions to the problem in the attachment:
唐军辉 Tang Junhui
主机侧软件开发
Host-side Software
Development
无线研究院 / 虚拟化长沙开发部 NIV
Changsha Development Dept/Wireless Product R&D Institute/Wireless Product
Operation
湖南长沙岳麓区尖山路中电软件园8楼 410205 8/F,CEC Software Park,NO.39, Jianshan Road, Lugu High-tech Industrial Center, Yuelu District, Changsha, P.R. China T: 0731 xxxxx M: +86 15616251617 E: tangjunhui@xxxxxxxxxx www.zte.com.cn |
-------------------------------------------------------- ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited. If you have received this mail in error, please delete it and notify us immediately.
Attachment:
[PATCH] libmultipath fix memory leak in reconfigure function.patch
Description: Binary data
-- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel