[dm-devel] [PATCH] libmultipath: fix memory API logic error

2016-08-15 Thread tang . junhui
From: "tang.junhui" Memroy API use mem_allocated to record the total size of used memory, however, it's wrong to use size(p) as the length of freed memory in xfree(), and memory may also be allocated by STRDUP() or REALLOC(), which is not calculated into mem_allocated, so the total size of used m

Re: [dm-devel] [PATCH] libmultipath: fix memory API logic error

2016-08-15 Thread Bart Van Assche
On 08/15/16 03:59, tang.jun...@zte.com.cn wrote: > From: "tang.junhui" > > Memroy API use mem_allocated to record the total size of used memory, > however, it's wrong to use size(p) as the length of freed memory in xfree(), > and memory may also be allocated by STRDUP() or REALLOC(), which is > no

Re: [dm-devel] [PATCH] libmultipath: fix memory API logic error

2016-08-15 Thread Johannes Thumshirn
On Mon, Aug 15, 2016 at 06:59:09PM +0800, tang.jun...@zte.com.cn wrote: > From: "tang.junhui" > > Memroy API use mem_allocated to record the total size of used memory, > however, it's wrong to use size(p) as the length of freed memory in xfree(), > and memory may also be allocated by STRDUP() or

Re: [dm-devel] [PATCH] libmultipath: fix memory API logic error

2016-08-15 Thread Bart Van Assche
On 08/15/16 05:11, Xose Vazquez Perez wrote: > libmultipath/memory.[ch] files along with libmultipath/parser.[ch] and > libmultipath/vector.[ch] come from keepalived/lib/ [1] . > > Maybe it's worth to backport their fixes and new features. Hello Xose, Are you aware that there are tools available

Re: [dm-devel] [PATCH] libmultipath: fix memory API logic error

2016-08-15 Thread Xose Vazquez Perez
tang.junhui wrote: > Memroy API use mem_allocated to record the total size of used memory, > however, it's wrong to use size(p) as the length of freed memory in xfree(), > and memory may also be allocated by STRDUP() or REALLOC(), which is > not calculated into mem_allocated, so the total size of

[dm-devel] [PATCH] libmultipath: fix memory API logic error

2016-08-15 Thread tang . junhui
From: "tang.junhui" Memroy API use mem_allocated to record the total size of used memory, however, it's wrong to use size(p) as the length of freed memory in xfree(), and memory may also be allocated by STRDUP() or REALLOC(), which is not calculated into mem_allocated, so the total size of used m