[dm-devel] [PATCH] libmultipath: fix memory leak in reconfigure

tang.junhui at zte.com.cn tang.junhui at zte.com.cn
Mon Jul 4 05:45:43 UTC 2016


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 at zte.com.cn
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20160704/4f881a3d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 6015 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20160704/4f881a3d/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 2054 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20160704/4f881a3d/attachment-0001.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: [dm-devel] [PATCH] libmultipath fix memory leak	in reconfigure function.patch
Type: application/octet-stream
Size: 844 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20160704/4f881a3d/attachment.obj>


More information about the dm-devel mailing list