g_lock: Initialize variables
authorVolker Lendecke <vl@samba.org>
Wed, 5 Jul 2017 10:16:02 +0000 (12:16 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 25 Jul 2017 15:43:17 +0000 (17:43 +0200)
gcc -O3 complains, but I think this is a false positive

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/lib/g_lock.c

index 7a924b96b3f7cba43b35b339af30581026c14494..a79a9ccbea6c941ab268f4cd78a280af46aee1bc 100644 (file)
@@ -765,8 +765,8 @@ NTSTATUS g_lock_dump(struct g_lock_ctx *ctx, const char *name,
        TDB_DATA data;
        size_t num_locks;
        struct g_lock_rec *locks = NULL;
-       uint8_t *userdata;
-       size_t userdatalen;
+       uint8_t *userdata = NULL;
+       size_t userdatalen = 0;
        NTSTATUS status;
 
        status = dbwrap_fetch_bystring(ctx->db, talloc_tos(), name, &data);