From: Jeremy Allison Date: Mon, 30 Apr 2007 03:38:19 +0000 (+0000) Subject: r22591: Fix up the examples also. X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~576 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aa5a1591c626e2828244a78f237af8a59af57784;p=thirdparty%2Fsamba.git r22591: Fix up the examples also. Jeremy. --- diff --git a/examples/VFS/shadow_copy_test.c b/examples/VFS/shadow_copy_test.c index 155181229b1..98ac304ee2c 100644 --- a/examples/VFS/shadow_copy_test.c +++ b/examples/VFS/shadow_copy_test.c @@ -58,7 +58,11 @@ static int test_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fs shadow_copy_data->num_volumes = num; if (labels) { - shadow_copy_data->labels = TALLOC_ZERO_ARRAY(shadow_copy_data->mem_ctx,SHADOW_COPY_LABEL,num); + if (num) { + shadow_copy_data->labels = TALLOC_ZERO_ARRAY(shadow_copy_data->mem_ctx,SHADOW_COPY_LABEL,num); + } else { + shadow_copy_data->labels = NULL; + } for (i=0;ilabels[i], sizeof(SHADOW_COPY_LABEL), "@GMT-2003.08.05-12.%02u.00",i); }