From: Volker Lendecke Date: Tue, 11 Aug 2015 11:36:45 +0000 (+0200) Subject: nfs4acls: Use talloc_realloc() X-Git-Tag: talloc-2.1.4~408 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fafd0a0c693dc523452640f00b96114b9ffddbf7;p=thirdparty%2Fsamba.git nfs4acls: Use talloc_realloc() Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher --- diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index fda4728e8c0..a680ad182e3 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -456,9 +456,9 @@ static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx, } } - nt_ace_list = (struct security_ace *) - TALLOC_REALLOC(mem_ctx, nt_ace_list, - good_aces * sizeof(struct security_ace)); + nt_ace_list = talloc_realloc(mem_ctx, nt_ace_list, struct security_ace, + good_aces); + /* returns a NULL ace list when good_aces is zero. */ if (good_aces && nt_ace_list == NULL) { DEBUG(10, ("realloc error with %d aces", good_aces));