Use talloc_stackframe() for temporary contexts throughout libnet_conf.c
authorMichael Adam <obnox@samba.org>
Mon, 21 Jan 2008 14:28:04 +0000 (15:28 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 21 Jan 2008 21:49:45 +0000 (22:49 +0100)
Michael
(This used to be commit 4d734106b70b9b6029b537fe11f8b3c1aebd42cf)

source3/libnet/libnet_conf.c

index 152148300e74301d0dd764e0d6de55dc4c905b06..ec05fa7c1658a1fe57ce1ed3a4378f26976a8e5c 100644 (file)
@@ -195,7 +195,7 @@ static WERROR libnet_conf_reg_create_service_key(TALLOC_CTX *mem_ctx,
        /* create a new talloc ctx for creation. it will hold
         * the intermediate parent key (SMBCONF) for creation
         * and will be destroyed when leaving this function... */
-       if (!(create_ctx = talloc_new(mem_ctx))) {
+       if (!(create_ctx = talloc_stackframe())) {
                werr = WERR_NOMEM;
                goto done;
        }
@@ -361,7 +361,7 @@ static WERROR libnet_conf_reg_get_values(TALLOC_CTX *mem_ctx,
                goto done;
        }
 
-       tmp_ctx = talloc_new(mem_ctx);
+       tmp_ctx = talloc_stackframe();
        if (tmp_ctx == NULL) {
                werr = WERR_NOMEM;
                goto done;
@@ -544,7 +544,7 @@ WERROR libnet_conf_get_config(TALLOC_CTX *mem_ctx,
                goto done;
        }
 
-       tmp_ctx = talloc_new(mem_ctx);
+       tmp_ctx = talloc_stackframe();
        if (tmp_ctx == NULL) {
                werr = WERR_NOMEM;
                goto done;
@@ -619,7 +619,7 @@ WERROR libnet_conf_get_share_names(TALLOC_CTX *mem_ctx,
                goto done;
        }
 
-       tmp_ctx = talloc_new(mem_ctx);
+       tmp_ctx = talloc_stackframe();
        if (tmp_ctx == NULL) {
                werr = WERR_NOMEM;
                goto done;