Fixed memory leak in master and slave destructors.
authorFlorian Pose <fp@igh-essen.com>
Thu, 19 Oct 2006 14:05:56 +0000
changeset 418 7a43437bc48b
parent 417 a4193f7ba5b4
child 419 cf724fc82a00
Fixed memory leak in master and slave destructors.
master/master.c
master/slave.c
--- a/master/master.c	Wed Oct 18 13:19:21 2006 +0000
+++ b/master/master.c	Thu Oct 19 14:05:56 2006 +0000
@@ -218,6 +218,8 @@
     }
 
     EC_INFO("Master %i cleared.\n", master->index);
+
+    kfree(master);
 }
 
 /*****************************************************************************/
--- a/master/slave.c	Wed Oct 18 13:19:21 2006 +0000
+++ b/master/slave.c	Thu Oct 19 14:05:56 2006 +0000
@@ -234,6 +234,8 @@
 
     if (slave->eeprom_data) kfree(slave->eeprom_data);
     if (slave->new_eeprom_data) kfree(slave->new_eeprom_data);
+
+    kfree(slave);
 }
 
 /*****************************************************************************/