s3: smbclient. Ensure we don't crash by freeing uninitialized *snapshots.
authorJeremy Allison <jra@samba.org>
Fri, 19 Aug 2016 23:57:27 +0000 (16:57 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 22 Aug 2016 17:10:22 +0000 (19:10 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
source3/client/client.c

index 7fbfdf0d8d95cc71bbfdf9e4f46a0c1aa7101410..e7531d347aa9f7da3b92b2766490f8f642364dba 100644 (file)
@@ -1696,7 +1696,7 @@ static int do_allinfo(const char *name)
        unsigned int num_streams;
        struct stream_struct *streams;
        int num_snapshots;
-       char **snapshots;
+       char **snapshots = NULL;
        unsigned int i;
        NTSTATUS status;