diff options
author | 2021-01-07 16:34:25 +0100 | |
---|---|---|
committer | 2021-01-07 16:34:25 +0100 | |
commit | 52cc578d5341f35f9dc3197af4b72720f916a709 (patch) | |
tree | 0e9054c40d38dccf2b96e64f96f7fba05fd78ee4 /hicn-light/src | |
parent | de6c35cb8a78d7e05864316743dc1d204f65631b (diff) |
[HICN-668] Fix various leaks across codebase
Change-Id: If08eeebd4ab033e33e15809ad3b1a5cb74e83d90
Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'hicn-light/src')
-rw-r--r-- | hicn-light/src/hicn/io/udpListener.c | 1 | ||||
-rw-r--r-- | hicn-light/src/hicn/processor/fib.c | 2 | ||||
-rw-r--r-- | hicn-light/src/hicn/processor/fibEntry.h | 7 | ||||
-rw-r--r-- | hicn-light/src/hicn/processor/messageProcessor.c | 1 |
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 21b4f6190..16e8c8ddf 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 2f4dca9a3..de0d1e2ef 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 9e438b0e6..7a8699165 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 bdd9c23e8..d3f07cbda 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; } |