Add another check for talloc failure to libnet_conf
authorMichael Adam <obnox@samba.org>
Mon, 21 Jan 2008 14:35:09 +0000 (15:35 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 21 Jan 2008 21:49:45 +0000 (22:49 +0100)
Michael
(This used to be commit 196e4ce8c5dd5aab518aaa7d170eb1fb5d66bcd1)

source3/libnet/libnet_conf.c

index fc797bbeb9b2eabc21d316c35c4926096fdfe02c..4d998acad80537c809f89a519357332dba0cc15c 100644 (file)
@@ -138,6 +138,10 @@ static WERROR libnet_conf_reg_open_service_key(TALLOC_CTX *mem_ctx,
        }
 
        path = talloc_asprintf(mem_ctx, "%s\\%s", KEY_SMBCONF, servicename);
+       if (path == NULL) {
+               werr = WERR_NOMEM;
+               goto done;
+       }
 
        werr = libnet_conf_reg_open_path(mem_ctx, ctx, path, desired_access,
                                         key);