[dm-devel] [PATCH] libmultipath: fix memory API logic error
Xose Vazquez Perez
xose.vazquez at gmail.com
Mon Aug 15 12:11:12 UTC 2016
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 used memory is
> not correctly. For these reasons, we removed these incorrectly code to keep
> the code clean.
> libmpathpersist/mpath_updatepr.c | 1 -
> libmultipath/memory.c | 31 -------------------------------
> libmultipath/memory.h | 13 ++-----------
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.
[1] https://github.com/acassen/keepalived
More information about the dm-devel
mailing list