summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorChristof Schmitt <cs@samba.org>2019-04-01 16:23:35 -0700
committerJeremy Allison <jra@samba.org>2019-04-06 05:12:21 +0000
commita04ca6f3438595ba7e1a110877f53d1cac0f0402 (patch)
tree2421df90d0dc161bf5086b4d34c55be5b9ab09e7 /source3/torture
parent7c44f2f76eefb9156cb1d170c92b4ff07dd6a3d5 (diff)
downloadsamba-a04ca6f3438595ba7e1a110877f53d1cac0f0402.tar.gz
memcache: Properly track the size of talloc objects
With memcache_add_talloc, the talloc object becomes part of the pool and the memcache_element stores a pointer to the talloc object. The size of the the talloc object was not used when tracking the used space, allowing the cache to grow larger than defined in the memcache_init call. Fix this by adding the size of the talloc object to the used space. Also record the initial size of the talloc object for proper adjustment of the used space in the cache later. This is in case the size of the talloc object is modified while being owned by the cache (e.g. allocating talloc child objects). This should never happen, but better be safe than ending up with a broken cache usage counter. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13865 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/torture')
0 files changed, 0 insertions, 0 deletions