summaryrefslogtreecommitdiff
path: root/common/src/tfe_ctrl_packet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/tfe_ctrl_packet.cpp')
-rw-r--r--common/src/tfe_ctrl_packet.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/common/src/tfe_ctrl_packet.cpp b/common/src/tfe_ctrl_packet.cpp
index 44dd337..94f4ba5 100644
--- a/common/src/tfe_ctrl_packet.cpp
+++ b/common/src/tfe_ctrl_packet.cpp
@@ -190,11 +190,14 @@ static int tags_ids_array_parse_mpack(struct ctrl_pkt_parser *handler, mpack_nod
if (mpack_parse_uuid(mpack_node_array_at(node, i), tags_ids[i]) != 0)
{
TFE_LOG_ERROR(g_packet_io_logger, "%s: session %lu unexpected control packet: (%s[%d] len != uuid_t[%d])", LOG_TAG_CTRLPKT, handler->session_id, tags_ids_cmsg_name_maps[map_index], i, UUID_LEN);
- return -1;
+ goto end;
}
}
tfe_cmsg_set(handler->cmsg, (enum tfe_cmsg_tlv_type)tags_ids_cmsg_maps[map_index], (const unsigned char*)tags_ids, tags_ids_len);
+end:
+ if (tags_ids)
+ free(tags_ids);
return 0;
}