malloc: fix pad erasing
authorAnatoly Burakov <anatoly.burakov@intel.com>
Thu, 31 May 2018 17:05:40 +0000 (18:05 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 13 Jul 2018 09:21:30 +0000 (11:21 +0200)
commite43a9f52b7ff1758a34662030d6fa78ff9313d59
treeac6a307ff238b31a833c4c26ef064c5e9082f2f7
parente26415428fe3f99c41f99e9c3b138a0eac3fb3d8
malloc: fix pad erasing

Previously, when joining adjacent free elements, we were erasing
trailer and header, but did not erase the padding. Fix this by
accounting for padding on erase, and do not erase padding twice
by adjusting data pointer and data len to not include padding.

Fixes: bb372060dad4 ("malloc: make heap a doubly-linked list")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/common/malloc_elem.c