From 3fe9b28933e296a503a713f92a30a5c75e267272 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 10 Sep 2009 15:29:57 +0200 Subject: [PATCH] Fix leak in load_database. This leak is small but seems to have been there for quite some time. --- src/database.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database.c b/src/database.c index 0dd359b..e030ecc 100644 --- a/src/database.c +++ b/src/database.c @@ -153,7 +153,7 @@ static struct database *load_database(const char *id, memset(db, 0, sizeof(*db)); db->host = 0; db->url = nmem_strdup(service->nmem, id); - db->databases = xmalloc(2 * sizeof(char *)); + db->databases = nmem_malloc(service->nmem, 2 * sizeof(char *)); db->databases[0] = nmem_strdup(service->nmem, dbname); db->databases[1] = 0; db->errors = 0; -- 1.7.10.4