aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hicn-light/src/hicn/core/messageHandler.h2
-rw-r--r--hicn-light/src/hicn/io/streamConnection.c2
-rw-r--r--hicn-light/src/hicn/io/udpListener.c5
3 files changed, 6 insertions, 3 deletions
diff --git a/hicn-light/src/hicn/core/messageHandler.h b/hicn-light/src/hicn/core/messageHandler.h
index a8b2a3e54..f6b3e4e36 100644
--- a/hicn-light/src/hicn/core/messageHandler.h
+++ b/hicn-light/src/hicn/core/messageHandler.h
@@ -321,7 +321,7 @@ static inline bool messageHandler_handleHooks(Forwarder * forwarder,
/* ... */
/* END Process */
-
+ parcMemory_Deallocate((void **)&packet);
return true;
}
diff --git a/hicn-light/src/hicn/io/streamConnection.c b/hicn-light/src/hicn/io/streamConnection.c
index 00298d1b0..53ffa74c3 100644
--- a/hicn-light/src/hicn/io/streamConnection.c
+++ b/hicn-light/src/hicn/io/streamConnection.c
@@ -610,7 +610,7 @@ static void _conn_readcb(PARCEventQueue *event, PARCEventType type,
// If received correctly the whole message, send to dispatcher
if (message) {
forwarder_ReceiveCommand(stream->forwarder, command, rx, stream->id);
- parcMemory_Deallocate((void **)&rx);
+ //parcMemory_Deallocate((void **)&rx);
parcEventBuffer_Destroy(&message);
}
diff --git a/hicn-light/src/hicn/io/udpListener.c b/hicn-light/src/hicn/io/udpListener.c
index 16e8c8ddf..3b318c500 100644
--- a/hicn-light/src/hicn/io/udpListener.c
+++ b/hicn-light/src/hicn/io/udpListener.c
@@ -481,6 +481,7 @@ static void _handleWldrNotification(UdpListener *udp, unsigned connId,
const Connection *conn = connectionTable_FindById(
forwarder_GetConnectionTable(udp->forwarder), connId);
if (conn == NULL) {
+ parcMemory_Deallocate((void **)&msgBuffer);
return;
}
@@ -556,6 +557,7 @@ static void _readCommand(ListenerOps * listener, int fd,
if (*command != REQUEST_LIGHT){
printf("the message received is not a command, drop\n");
+ parcMemory_Deallocate((void **) &command);
return;
}
@@ -563,6 +565,7 @@ static void _readCommand(ListenerOps * listener, int fd,
if (id >= LAST_COMMAND_VALUE){
printf("the message received is not a valid command, drop\n");
+ parcMemory_Deallocate((void **) &command);
return;
}
@@ -588,7 +591,7 @@ static void _readCommand(ListenerOps * listener, int fd,
forwarder_ReceiveCommand(udp->forwarder, id, request, connid);
parcMemory_Deallocate((void **) &command);
- parcMemory_Deallocate((void **) &request);
+ //parcMemory_Deallocate((void **) &request);
}