gencache: Refactor gencache_set_data_blob
authorVolker Lendecke <vl@samba.org>
Sun, 13 Dec 2015 20:16:36 +0000 (21:16 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 14 Dec 2015 19:23:13 +0000 (20:23 +0100)
commit8ca3a58ec923d9e3f69c2a8971873acedce761d6
tree8c9739f1854dcea399b2c541eac1bc2e597d5f99
parent640870ee2089536d2f7bda035668c96e8b364e54
gencache: Refactor gencache_set_data_blob

Replace 3 calls into talloc with 1. Add an overflow check.

With this change, it will be easier to avoid the talloc call for small
blobs in the future and do it on the stack.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/gencache.c