[DRBD-cvs] svn commit by phil - r2456 - trunk/drbd - OOPS, fixing the last commit.

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Mon Sep 25 15:23:47 CEST 2006


Author: phil
Date: 2006-09-25 15:23:46 +0200 (Mon, 25 Sep 2006)
New Revision: 2456

Modified:
   trunk/drbd/drbd_nl.c
   trunk/drbd/drbd_receiver.c
Log:
OOPS, fixing the last commit.


Modified: trunk/drbd/drbd_nl.c
===================================================================
--- trunk/drbd/drbd_nl.c	2006-09-25 13:22:09 UTC (rev 2455)
+++ trunk/drbd/drbd_nl.c	2006-09-25 13:23:46 UTC (rev 2456)
@@ -1110,7 +1110,7 @@
 	retcode = _drbd_request_state(mdev,NS(conn,Disconnecting),0);	// silently.
 
 	if ( retcode == SS_NothingToDo ) goto done;
-	else if ( retcode == AlreadyStandAlone ) goto done;
+	else if ( retcode == SS_AlreadyStandAlone ) goto done;
 	else if ( retcode == SS_PrimaryNOP ) {
 		// Our statche checking code wants to see the peer outdated.
 		retcode = drbd_request_state(mdev,NS2(conn,Disconnecting,

Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c	2006-09-25 13:22:09 UTC (rev 2455)
+++ trunk/drbd/drbd_receiver.c	2006-09-25 13:23:46 UTC (rev 2456)
@@ -2523,9 +2523,9 @@
 
 	if(mdev->state.conn == Disconnecting) {
 		wait_event( mdev->cstate_wait,atomic_read(&mdev->net_cnt) == 0 );
-		kfree(mdev->ee_hash);
-		kfree(mdev->tl_hash);
-		crypto_free_tfm(mdev->cram_hmac_tfm);
+		if(mdev->ee_hash) kfree(mdev->ee_hash);
+		if(mdev->tl_hash) kfree(mdev->tl_hash);
+		if(mdev->cram_hmac_tfm) crypto_free_tfm(mdev->cram_hmac_tfm);
 		kfree(mdev->net_conf);
 		mdev->net_conf=NULL;
 		drbd_request_state(mdev, NS(conn,StandAlone));



More information about the drbd-cvs mailing list