From d35ff9e9bdae79e5f5b2c9b5bf8cfe05199da804 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 11 Jan 2017 11:48:25 -0800 Subject: [PATCH] lib: talloc: Make it clear that talloc_get_size(NULL) returns 0. This *isn't* a behavior change, as the previous code could potentially return the size of null_context, which (currently) is defined as a named talloc region of ZERO size, but this makes it very clear what the ABI behavior should be. Signed-off-by: Jeremy Allison Reviewed-by: Andreas Schneider Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Thu Jan 12 19:23:25 CET 2017 on sn-devel-144 --- lib/talloc/talloc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c index 279021c137a..8bdd4b6653a 100644 --- a/lib/talloc/talloc.c +++ b/lib/talloc/talloc.c @@ -2738,9 +2738,6 @@ _PUBLIC_ size_t talloc_get_size(const void *context) { struct talloc_chunk *tc; - if (context == NULL) { - context = null_context; - } if (context == NULL) { return 0; } -- 2.47.2