From 716eb62b5dab37c203b306047b65280ddf34844a Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Sat, 24 Oct 2009 00:02:02 +0300 Subject: s4/ldb: Fix double allocation for "ldb_url" Signed-off-by: Stefan Metzmacher --- source4/lib/ldb/common/ldb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/lib/ldb/common') diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index 9be3aa13e4..732d100827 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -217,7 +217,7 @@ int ldb_connect(struct ldb_context *ldb, const char *url, unsigned int flags, const char *options[]) { int ret; - const char *url2; + char *url2; /* We seem to need to do this here, or else some utilities don't * get ldb backends */ @@ -228,7 +228,7 @@ int ldb_connect(struct ldb_context *ldb, const char *url, ldb_oom(ldb); return LDB_ERR_OPERATIONS_ERROR; } - ret = ldb_set_opaque(ldb, "ldb_url", talloc_strdup(ldb, url2)); + ret = ldb_set_opaque(ldb, "ldb_url", url2); if (ret != LDB_SUCCESS) { return ret; } -- cgit