From: scipio Date: Wed, 3 Oct 2007 02:15:16 +0000 (+0000) Subject: Found memory leak. X-Git-Tag: release_tinyos_2_1_0_0~697 X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=commitdiff_plain;h=da05833bb9dad82fd97a43dab14946479e42d8fb;p=tinyos-2.x.git Found memory leak. --- diff --git a/tos/lib/net/ctp/CtpForwardingEngineP.nc b/tos/lib/net/ctp/CtpForwardingEngineP.nc index e7cb53ce..55893c7c 100644 --- a/tos/lib/net/ctp/CtpForwardingEngineP.nc +++ b/tos/lib/net/ctp/CtpForwardingEngineP.nc @@ -440,6 +440,10 @@ implementation { if (call SentCache.lookup(qe->msg)) { call CollectionDebug.logEvent(NET_C_FE_DUPLICATE_CACHE_AT_SEND); call SendQueue.dequeue(); + if (call MessagePool.put(qe->msg) != SUCCESS) + call CollectionDebug.logEvent(NET_C_FE_PUT_MSGPOOL_ERR); + if (call QEntryPool.put(qe) != SUCCESS) + call CollectionDebug.logEvent(NET_C_FE_PUT_QEPOOL_ERR); post sendTask(); return; }