# HG changeset patch
# User Florian Pose <fp@igh-essen.com>
# Date 1232353050 0
# Node ID fe4c953b7a701dfe9611ed7102d98bf965de2361
# Parent  14e9266295a7d5f876e4e8b29e25886dddc5fcb4
Fixed datagram cleaning.

diff -r 14e9266295a7 -r fe4c953b7a70 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;
+    }
 }
 
 /*****************************************************************************/