[DRBD-cvs] svn commit by phil - r2455 - trunk/drbd - Fixed a small memory leak.

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Mon Sep 25 15:22:10 CEST 2006


Author: phil
Date: 2006-09-25 15:22:09 +0200 (Mon, 25 Sep 2006)
New Revision: 2455

Modified:
   trunk/drbd/drbd_nl.c
   trunk/drbd/drbd_receiver.c
Log:
Fixed a small memory leak.


Modified: trunk/drbd/drbd_nl.c
===================================================================
--- trunk/drbd/drbd_nl.c	2006-09-25 13:16:50 UTC (rev 2454)
+++ trunk/drbd/drbd_nl.c	2006-09-25 13:22:09 UTC (rev 2455)
@@ -1123,11 +1123,6 @@
 
 	if( retcode < SS_Success ) goto fail;
 
-	if ( mdev->cram_hmac_tfm ) {
-		crypto_free_tfm(mdev->cram_hmac_tfm);
-		mdev->cram_hmac_tfm = NULL;
-	}
-
  done:
 	retcode = NoError;
  fail:

Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c	2006-09-25 13:16:50 UTC (rev 2454)
+++ trunk/drbd/drbd_receiver.c	2006-09-25 13:22:09 UTC (rev 2455)
@@ -2523,6 +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);
 		kfree(mdev->net_conf);
 		mdev->net_conf=NULL;
 		drbd_request_state(mdev, NS(conn,StandAlone));



More information about the drbd-cvs mailing list