Fix bug 6014 -- mget shouldn't segfault without arguments
[tprouty/samba.git] / source3 / client / client.c
index 529f21ab302d649d9dc0d475d3f40d9d8f15b77f..c40c04e9c676b35051186cb727f5d08acc0d8e99 100644 (file)
@@ -1353,6 +1353,11 @@ static int cmd_mget(void)
                do_list(mget_mask, attribute, do_mget, false, true);
        }
 
+       if (mget_mask == NULL) {
+               d_printf("nothing to mget\n");
+               return 0;
+       }
+
        if (!*mget_mask) {
                mget_mask = talloc_asprintf(ctx,
                                        "%s*",