[SCM] CTDB repository - branch master updated - ctdb-1.0.57-23-g95bf365

Ronnie Sahlberg sahlberg at samba.org
Mon Sep 15 21:56:38 GMT 2008


The branch, master has been updated
       via  95bf36559d62f29e6f538f3a173b504ef3258341 (commit)
      from  0aca4daf908b76d6013ff3dfad41beb9114fc1a3 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 95bf36559d62f29e6f538f3a173b504ef3258341
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Sep 16 07:55:57 2008 +1000

    fix some slow memory leaks in the vacuuming handler in the recovery
    daemon

-----------------------------------------------------------------------

Summary of changes:
 server/ctdb_recoverd.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/ctdb_recoverd.c b/server/ctdb_recoverd.c
index af1c358..779d26f 100644
--- a/server/ctdb_recoverd.c
+++ b/server/ctdb_recoverd.c
@@ -880,6 +880,7 @@ static void vacuum_fetch_handler(struct ctdb_context *ctdb, uint64_t srvid,
 	r = (struct ctdb_rec_data *)&recs->data[0];
 
 	if (recs->count == 0) {
+		talloc_free(tmp_ctx);
 		return;
 	}
 
@@ -888,6 +889,7 @@ static void vacuum_fetch_handler(struct ctdb_context *ctdb, uint64_t srvid,
 	for (v=rec->vacuum_info;v;v=v->next) {
 		if (srcnode == v->srcnode && recs->db_id == v->ctdb_db->db_id) {
 			/* we're already working on records from this node */
+			talloc_free(tmp_ctx);
 			return;
 		}
 	}
@@ -930,6 +932,7 @@ static void vacuum_fetch_handler(struct ctdb_context *ctdb, uint64_t srvid,
 	v = talloc_zero(rec, struct vacuum_info);
 	if (v == NULL) {
 		DEBUG(DEBUG_CRIT,(__location__ " Out of memory\n"));
+		talloc_free(tmp_ctx);
 		return;
 	}
 
@@ -940,6 +943,7 @@ static void vacuum_fetch_handler(struct ctdb_context *ctdb, uint64_t srvid,
 	if (v->recs == NULL) {
 		DEBUG(DEBUG_CRIT,(__location__ " Out of memory\n"));
 		talloc_free(v);
+		talloc_free(tmp_ctx);
 		return;		
 	}
 	v->r = 	(struct ctdb_rec_data *)&v->recs->data[0];
@@ -949,6 +953,7 @@ static void vacuum_fetch_handler(struct ctdb_context *ctdb, uint64_t srvid,
 	talloc_set_destructor(v, vacuum_info_destructor);
 
 	vacuum_fetch_next(v);
+	talloc_free(tmp_ctx);
 }
 
 


-- 
CTDB repository


More information about the samba-cvs mailing list