lib: Add the pointer itself to talloc_report_str
authorVolker Lendecke <vl@samba.org>
Mon, 17 Aug 2015 09:55:26 +0000 (11:55 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 20 Aug 2015 10:49:21 +0000 (12:49 +0200)
A ctdb test found this discrepancy to talloc_report_full :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
lib/util/talloc_report.c

index 8d7d548137e58ecc61ba1ad510f1ddeadb9c92a0..9b98347e97c0279d72c8a88b7ea59031766db9c8 100644 (file)
@@ -146,11 +146,11 @@ static void talloc_report_str_helper(const void *ptr, int depth, int max_depth,
 
        state->s = talloc_asprintf_append_largebuf(
                state->s, &state->str_len,
-               "%*s%-30s contains %6lu bytes in %3lu blocks (ref %d)\n",
+               "%*s%-30s contains %6lu bytes in %3lu blocks (ref %d) %p\n",
                depth*4, "", name,
                (unsigned long)talloc_total_size(ptr),
                (unsigned long)talloc_total_blocks(ptr),
-               talloc_reference_count(ptr));
+               talloc_reference_count(ptr), ptr);
 }
 
 char *talloc_report_str(TALLOC_CTX *mem_ctx, TALLOC_CTX *root)