s3-vfs/snapper: Fix compiler errors when building with --address-sanitizer
authorAndrew Bartlett <abartlet@samba.org>
Tue, 7 Jun 2016 03:43:01 +0000 (15:43 +1200)
committerGarming Sam <garming@samba.org>
Thu, 16 Jun 2016 02:40:13 +0000 (04:40 +0200)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
source3/modules/vfs_snapper.c

index 07ec574a7ee99c91750b1a51235c77d67a2fbd00..8f3c647cd230589a3dc0b82adc35b26687ee7ffd 100644 (file)
@@ -1461,7 +1461,7 @@ static NTSTATUS snapper_snap_create(struct vfs_handle_struct *handle,
        NTSTATUS status;
        char *conf_name;
        char *base_path;
-       char *snap_path;
+       char *snap_path = NULL;
        TALLOC_CTX *tmp_ctx;
 
        tmp_ctx = talloc_new(mem_ctx);
@@ -1508,7 +1508,7 @@ static NTSTATUS snapper_delete_snap_call(TALLOC_CTX *mem_ctx,
                                         uint32_t snap_id)
 {
        NTSTATUS status;
-       DBusMessage *req_msg;
+       DBusMessage *req_msg = NULL;
        DBusMessage *rsp_msg;
 
        status = snapper_del_snap_pack(mem_ctx, conf_name, snap_id, &req_msg);
@@ -1603,7 +1603,7 @@ static int snapper_get_shadow_copy_data(struct vfs_handle_struct *handle,
        NTSTATUS status;
        char *conf_name;
        char *base_path;
-       DBusMessage *req_msg;
+       DBusMessage *req_msg = NULL;
        DBusMessage *rsp_msg;
        uint32_t num_snaps;
        struct snapper_snap *snaps;
@@ -1795,7 +1795,7 @@ static NTSTATUS snapper_get_snap_at_time_call(TALLOC_CTX *mem_ctx,
                                              char **snap_path_out)
 {
        NTSTATUS status;
-       DBusMessage *req_msg;
+       DBusMessage *req_msg = NULL;
        DBusMessage *rsp_msg;
        uint32_t num_snaps;
        struct snapper_snap *snaps;