From 1fd44cb4a33d70e206ac5e068b629b2435b252d7 Mon Sep 17 00:00:00 2001 From: Florian Pose <fp@igh-essen.com> Date: Mon, 26 Jan 2009 11:59:07 +0000 Subject: [PATCH] merge -c1614 branches/stable-1.4: Fixed datagram cleaning. --- master/datagram.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/master/datagram.c b/master/datagram.c index 7842daf1..32b9fff9 100644 --- a/master/datagram.c +++ b/master/datagram.c @@ -113,8 +113,10 @@ void ec_datagram_init(ec_datagram_t *datagram /**< EtherCAT datagram. */) */ 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; + } } /*****************************************************************************/ -- GitLab