Fixed datagram cleaning. stable-1.4
authorFlorian Pose <fp@igh-essen.com>
Mon, 19 Jan 2009 08:17:30 +0000
branchstable-1.4
changeset 1694 fe4c953b7a70
parent 1693 14e9266295a7
child 1695 69a948e240df
child 1706 c55ebaa206f8
Fixed datagram cleaning.
master/datagram.c
--- a/master/datagram.c	Mon Dec 29 16:00:44 2008 +0000
+++ b/master/datagram.c	Mon Jan 19 08:17:30 2009 +0000
@@ -113,8 +113,10 @@
  */
 void ec_datagram_clear(ec_datagram_t *datagram /**< EtherCAT datagram. */)
 {
-    if (datagram->data_origin == EC_ORIG_INTERNAL && datagram->data)
+    if (datagram->data_origin == EC_ORIG_INTERNAL && datagram->data) {
         kfree(datagram->data);
+    	datagram->data = NULL;
+    }
 }
 
 /*****************************************************************************/