nbt_server/wins: use talloc_zero() to create struct winsdb_handle
authorStefan Metzmacher <metze@sernet.de>
Wed, 18 Jun 2008 14:22:39 +0000 (16:22 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 19 Jan 2009 06:05:54 +0000 (07:05 +0100)
metze
(from samba4wins tree 0f2995f77ab092d71e539c2473c94956f9c253fb)

source4/nbt_server/wins/wins_ldb.c
source4/nbt_server/wins/winsdb.c

index 02ea30624309bd3f848d5922d3e1675cd793a37b..557c0f1dc6e7cc4d939e861d3ccd9821ffe8f6c5 100644 (file)
@@ -98,7 +98,7 @@ static int wins_ldb_init(struct ldb_module *ctx)
                }
        }
 
-       h = talloc(ctx, struct winsdb_handle);
+       h = talloc_zero(ctx, struct winsdb_handle);
        if (!h) goto failed;
        h->ldb          = ctx->ldb;
        h->caller       = WINSDB_HANDLE_CALLER_ADMIN;
index 5fb688b7b7037d1b19c304874d8803efce163749..fe0382d22b773c6396cec9c41a1a45ed6c65cbe8 100644 (file)
@@ -1006,7 +1006,7 @@ struct winsdb_handle *winsdb_connect(TALLOC_CTX *mem_ctx,
        bool ret;
        int ldb_err;
 
-       h = talloc(mem_ctx, struct winsdb_handle);
+       h = talloc_zero(mem_ctx, struct winsdb_handle);
        if (!h) return NULL;
 
        if (lp_parm_bool(lp_ctx, NULL,"winsdb", "nosync", false)) {