merge -c1614 branches/stable-1.4: Fixed datagram cleaning.
authorFlorian Pose <fp@igh-essen.com>
Mon, 26 Jan 2009 11:59:07 +0000
changeset 1333 7b9898062c8f
parent 1332 d62633fea8ed
child 1334 da3d22a27500
merge -c1614 branches/stable-1.4: Fixed datagram cleaning.
master/datagram.c
--- a/master/datagram.c	Mon Jan 26 11:58:35 2009 +0000
+++ b/master/datagram.c	Mon Jan 26 11:59:07 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;
+    }
 }
 
 /*****************************************************************************/