]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ndrdump: print structure name when failing to setup
authorAndrew Bartlett <abartlet@samba.org>
Mon, 18 Nov 2019 00:44:02 +0000 (13:44 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 20 Nov 2019 04:41:27 +0000 (04:41 +0000)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
librpc/tools/ndrdump.c

index be2ca68c1aaf9ef010f02e484b09fa2273b85974..f507db0011cb4d4d1da3ed55a10cafc0f0dbfd99 100644 (file)
@@ -419,13 +419,18 @@ static void ndr_print_dummy(struct ndr_print *ndr, const char *format, ...)
 
        st = talloc_zero_size(mem_ctx, f->struct_size);
        if (!st) {
-               printf("Unable to allocate %d bytes\n", (int)f->struct_size);
+               printf("Unable to allocate %d bytes for %s structure\n",
+                      (int)f->struct_size,
+                      f->name);
                exit(1);
        }
 
        v_st = talloc_zero_size(mem_ctx, f->struct_size);
        if (!v_st) {
-               printf("Unable to allocate %d bytes\n", (int)f->struct_size);
+               printf("Unable to allocate %d bytes for %s validation "
+                      "structure\n",
+                      (int)f->struct_size,
+                      f->name);
                exit(1);
        }