aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/hicn/core/name.c
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge+fdio@cisco.com>2021-01-05 18:05:48 +0100
committerJordan Augé <jordan.auge+fdio@cisco.com>2021-01-05 18:05:48 +0100
commitde6c35cb8a78d7e05864316743dc1d204f65631b (patch)
tree23bcfef948809688015581d4c1157507d28ff64e /hicn-light/src/hicn/core/name.c
parent82372f5a24039e4fa964e8d247d836c867d4761a (diff)
[HICN-668] Fix various leaks across codebase
Change-Id: I114e4e5d3e5bf4feb3d367b3f442c165ee193755 Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'hicn-light/src/hicn/core/name.c')
-rw-r--r--hicn-light/src/hicn/core/name.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hicn-light/src/hicn/core/name.c b/hicn-light/src/hicn/core/name.c
index 805e7bfae..b4a5e8d1b 100644
--- a/hicn-light/src/hicn/core/name.c
+++ b/hicn-light/src/hicn/core/name.c
@@ -239,8 +239,9 @@ char *name_ToString(const Name *name) {
Address *packetAddr = nameBitvector_ToAddress(name_GetContentName(name));
- sprintf(output, "name: %s seq: %u", addressToString(packetAddr),
- name->segment);
+ char * address_str = addressToString(packetAddr);
+ sprintf(output, "name: %s seq: %u", address_str, name->segment);
+ parcMemory_Deallocate((void **)&address_str);
addressDestroy(&packetAddr);