malloc: fix realloc padded element size
authorXueming Li <xuemingl@mellanox.com>
Tue, 12 Nov 2019 14:50:28 +0000 (14:50 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 20 Nov 2019 13:08:39 +0000 (14:08 +0100)
commit90f538b8630b2782460aae46f346ddb4fc102011
treee37cddab145224365a99edd9064afdbdc20bd0c1
parenta029a060369f74f42394301f87489aeb391220ef
malloc: fix realloc padded element size

When resize a memory with next element, the original element size grows.
If the orginal element has padding, the real inner element size didn't
grow as well and this causes trailer verification failure when malloc
debug enabled.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/common/malloc_elem.c