Was talloc_free()-ing a string in the wrong place.

Pushed to master under the one-liner rule.

-- 
Stephen Gallagher
RHCE 804006346421761

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
From 25456265ca1085539253bdbd7c1fa082e2997b8e Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <[email protected]>
Date: Fri, 11 Sep 2009 12:12:09 -0400
Subject: [PATCH] Fix first-time confdb generation

We were talloc_free()-ing the cdb_file string too early.
---
 server/monitor/monitor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c
index 6cf077d..3a7c4f2 100644
--- a/server/monitor/monitor.c
+++ b/server/monitor/monitor.c
@@ -1410,7 +1410,6 @@ static errno_t load_configuration(TALLOC_CTX *mem_ctx,
         DEBUG(0,("The confdb initialization failed\n"));
         goto done;
     }
-    talloc_free(cdb_file);
 
     /* Initialize the CDB from the configuration file */
     ret = confdb_test(ctx->cdb);
@@ -1439,6 +1438,7 @@ static errno_t load_configuration(TALLOC_CTX *mem_ctx,
         DEBUG(0, ("Fatal error initializing confdb\n"));
         goto done;
     }
+    talloc_zfree(cdb_file);
 
     ret = confdb_init_db(config_file, ctx->cdb);
     if (ret != EOK) {
-- 
1.6.2.5

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
sssd-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to