]> granicus.if.org Git - libnl/commit
cache_mngr: Fix memory corruption after resizing
authorThomas Graf <tgraf@redhat.com>
Sat, 21 Apr 2012 10:23:38 +0000 (12:23 +0200)
committerThomas Graf <tgraf@redhat.com>
Sat, 21 Apr 2012 10:23:38 +0000 (12:23 +0200)
commitadbc5687358ef62c5edb349332b3d031c01fcbb2
treeaea38ad402047554877316410d424170910c07a4
parenta143037fa37994270a3db7f7eb57f128c9f5b29a
cache_mngr: Fix memory corruption after resizing

The reallocated part of the enlarged association array was left
uninitialized which would have resulted in trying to free random
pointers.

This was a theoretical bug because it wasn't possible to register
more than 32 cache types since no netlink family supports that
many individual cache types.

Nevertheless this patch fixes the bug and also reduces the default
size of the allocation table and expandations a bit to reduce the
memory footprint slightly.
lib/cache_mngr.c