aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/hicn/core/name.c
diff options
context:
space:
mode:
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);