public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* Cluster Project branch, RHEL5, updated. cmirror_1_1_15-88-g4eca59f
@ 2008-05-16 18:17 jbrassow
  0 siblings, 0 replies; only message in thread
From: jbrassow @ 2008-05-16 18:17 UTC (permalink / raw)
  To: cluster-cvs, cluster-devel

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=4eca59fdacf347d0315eff78487b642e17be2de7

The branch, RHEL5 has been updated
       via  4eca59fdacf347d0315eff78487b642e17be2de7 (commit)
      from  23e72c453fcb6b67044d14a778a0b82de95b399c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4eca59fdacf347d0315eff78487b642e17be2de7
Author: Jonathan Brassow <jbrassow@redhat.com>
Date:   Fri May 16 13:16:23 2008 -0500

    clogd:  Fix 444171 [memory leak]
    
    If there was an invalid request to the cluster
    log server, it would ignore it.  This is fine, but it
    did not free the memory structure holding the invalid
    request.
    
    I've also taken this opportunity to explicitly state
    all valid requests, and let the 'default' case handle
    the errors.

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

Summary of changes:
 cmirror/src/local.c |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/cmirror/src/local.c b/cmirror/src/local.c
index 44e7243..0a65870 100644
--- a/cmirror/src/local.c
+++ b/cmirror/src/local.c
@@ -206,9 +206,6 @@ static int do_local_work(void *data)
 		SHORT_UUID(tfr->uuid), RQ_TYPE(tfr->request_type),
 		tfr->seq);
 	switch (tfr->request_type) {
-	case 0:
-		LOG_ERROR("Invalid request_type");
-		break;
 	case DM_CLOG_CTR:
 	case DM_CLOG_DTR:
 	case DM_CLOG_IN_SYNC:
@@ -257,8 +254,14 @@ static int do_local_work(void *data)
 					  RQ_TYPE(tfr->request_type));
 			break;
 		}
-		/* ELSE, fall through to default */
-	default:
+		/* ELSE, fall through */
+	case DM_CLOG_IS_CLEAN:
+	case DM_CLOG_FLUSH:
+	case DM_CLOG_MARK_REGION:
+	case DM_CLOG_CLEAR_REGION:
+	case DM_CLOG_GET_RESYNC_WORK:
+	case DM_CLOG_SET_REGION_SYNC:
+	case DM_CLOG_IS_REMOTE_RECOVERING:
 		r = cluster_send(tfr);
 		if (r) {
 			LOG_ERROR("[%s] Unable to send %s to cluster: %s",
@@ -277,6 +280,11 @@ static int do_local_work(void *data)
 		}
 
 		break;
+	case DM_CLOG_GET_REGION_SIZE:
+	default:
+		LOG_ERROR("Invalid log request received, ignoring.");
+		queue_add_tail(tfr, free_queue);
+		return 0;
 	}
 
 	if (r && !tfr->error) {


hooks/post-receive
--
Cluster Project


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-16 18:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-16 18:17 Cluster Project branch, RHEL5, updated. cmirror_1_1_15-88-g4eca59f jbrassow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).