Skip to content

Commit

Permalink
Merge pull request #122 from cgundogan/pr/cs_dump_memory_leak
Browse files Browse the repository at this point in the history
ccnl-core-util.c: fix ccnl_cs_dump memory leak
  • Loading branch information
blacksheeep committed May 10, 2017
2 parents 36de664 + 34f52fa commit 7b973a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ccnl-core-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1112,12 +1112,14 @@ ccnl_cs_dump(struct ccnl_relay_s *ccnl)
{
struct ccnl_content_s *c = ccnl->contents;
unsigned i = 0;
char *s;
while (c) {
printf("CS[%u]: %s [%d]: %s\n", i++,
ccnl_prefix_to_path(c->pkt->pfx),
(s = ccnl_prefix_to_path(c->pkt->pfx)),
(c->pkt->pfx->chunknum)? *(c->pkt->pfx->chunknum) : -1,
c->pkt->content);
c = c->next;
ccnl_free(s);
}
}

Expand Down

0 comments on commit 7b973a7

Please sign in to comment.