aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge+fdio@cisco.com>2021-01-07 16:34:25 +0100
committerJordan Augé <jordan.auge+fdio@cisco.com>2021-01-07 16:34:25 +0100
commit52cc578d5341f35f9dc3197af4b72720f916a709 (patch)
tree0e9054c40d38dccf2b96e64f96f7fba05fd78ee4
parentde6c35cb8a78d7e05864316743dc1d204f65631b (diff)
[HICN-668] Fix various leaks across codebase
Change-Id: If08eeebd4ab033e33e15809ad3b1a5cb74e83d90 Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
-rw-r--r--hicn-light/src/hicn/io/udpListener.c1
-rw-r--r--hicn-light/src/hicn/processor/fib.c2
-rw-r--r--hicn-light/src/hicn/processor/fibEntry.h7
-rw-r--r--hicn-light/src/hicn/processor/messageProcessor.c1
4 files changed, 4 insertions, 7 deletions
diff --git a/hicn-light/src/hicn/io/udpListener.c b/hicn-light/src/hicn/io/udpListener.c
index 21b4f61..16e8c8d 100644
--- a/hicn-light/src/hicn/io/udpListener.c
+++ b/hicn-light/src/hicn/io/udpListener.c
@@ -633,6 +633,7 @@ static void _readcb(int fd, PARCEventType what, void * listener_void) {
if(readLength < 0) {
printf("unable to read the message\n");
+ parcMemory_Deallocate(packet);
return;
}
diff --git a/hicn-light/src/hicn/processor/fib.c b/hicn-light/src/hicn/processor/fib.c
index 2f4dca9..de0d1e2 100644
--- a/hicn-light/src/hicn/processor/fib.c
+++ b/hicn-light/src/hicn/processor/fib.c
@@ -236,6 +236,8 @@ void fib_Add(FIB *fib, FibEntry *entry) {
inner_node ->right = curr;
}
fib->size ++;
+
+ name_Release(&inner_prefix);
}
FibEntry *fib_Contains(const FIB *fib, const Name *prefix) {
diff --git a/hicn-light/src/hicn/processor/fibEntry.h b/hicn-light/src/hicn/processor/fibEntry.h
index 9e438b0..7a86991 100644
--- a/hicn-light/src/hicn/processor/fibEntry.h
+++ b/hicn-light/src/hicn/processor/fibEntry.h
@@ -99,13 +99,6 @@ size_t fibEntry_NexthopCount(const FibEntry *fibEntry);
*/
const NumberSet *fibEntry_GetNexthops(const FibEntry *fibEntry);
-const NumberSet *fibEntry_GetNexthopsFromForwardingStrategy(
-#ifdef WITH_POLICY
- FibEntry *fibEntry, const Message *interestMessage, bool is_retransmission);
-#else
- const FibEntry *fibEntry, const Message *interestMessage);
-#endif /* WITH_POLICY */
-
#ifdef WITH_POLICY
void fibEntry_ReceiveObjectMessage(FibEntry *fibEntry,
#else
diff --git a/hicn-light/src/hicn/processor/messageProcessor.c b/hicn-light/src/hicn/processor/messageProcessor.c
index bdd9c23..d3f07cb 100644
--- a/hicn-light/src/hicn/processor/messageProcessor.c
+++ b/hicn-light/src/hicn/processor/messageProcessor.c
@@ -619,6 +619,7 @@ static bool messageProcessor_ForwardViaFib(MessageProcessor *processor,
}
}
+ numberSet_Release(&nexthops);
return false;
}