libwbclient: Zero out context on initialization
authorKai Blin <kai@samba.org>
Fri, 29 Jan 2010 10:54:33 +0000 (11:54 +0100)
committerKai Blin <kai@samba.org>
Thu, 11 Feb 2010 22:53:36 +0000 (23:53 +0100)
This prevents a segfault when using wbcDebug without prior call to wbcSetDebug

nsswitch/libwbclient/wbc_async.c

index 181d5463e94c34d91f5c7b78d1788ff4eb10e921..d1dd76d768a976d515f039face1907cf84dd656a 100644 (file)
@@ -192,7 +192,7 @@ struct wb_context *wb_context_init(TALLOC_CTX *mem_ctx, const char* dir)
 {
        struct wb_context *result;
 
-       result = talloc(mem_ctx, struct wb_context);
+       result = talloc_zero(mem_ctx, struct wb_context);
        if (result == NULL) {
                return NULL;
        }