You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pe...@apache.org on 2022/03/21 05:27:55 UTC
[celix] 01/01: Fix memory leaks in psa, reported by CI.
This is an automated email from the ASF dual-hosted git repository.
pengzheng pushed a commit to branch hotfix/psa_memory_leak
in repository https://gitbox.apache.org/repos/asf/celix.git
commit debaeefae2d4c05d8a191e8f98bae34b51f8802f
Author: PengZheng <ho...@gmail.com>
AuthorDate: Mon Mar 21 13:27:32 2022 +0800
Fix memory leaks in psa, reported by CI.
---
bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_sender.c | 1 +
bundles/pubsub/pubsub_admin_udp_mc/src/pubsub_udpmc_topic_sender.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_sender.c b/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_sender.c
index e318829..0331308 100644
--- a/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_sender.c
+++ b/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_sender.c
@@ -368,6 +368,7 @@ psa_tcp_topicPublicationSend(void *handle, unsigned int msgTypeId, const void *i
if (status != CELIX_SUCCESS) {
L_WARN("Cannot find serializer for msg id %u for serializer %s", msgTypeId,
pubsub_serializerHandler_getSerializationType(sender->serializerHandler));
+ celix_properties_destroy(metadata);
return status;
}
diff --git a/bundles/pubsub/pubsub_admin_udp_mc/src/pubsub_udpmc_topic_sender.c b/bundles/pubsub/pubsub_admin_udp_mc/src/pubsub_udpmc_topic_sender.c
index 663b513..db92293 100644
--- a/bundles/pubsub/pubsub_admin_udp_mc/src/pubsub_udpmc_topic_sender.c
+++ b/bundles/pubsub/pubsub_admin_udp_mc/src/pubsub_udpmc_topic_sender.c
@@ -330,6 +330,7 @@ static int psa_udpmc_topicPublicationSend(void* handle, unsigned int msgTypeId,
printf("[PSA_UDPMC/TopicSender] No msg serializer available for msg type id %d\n", msgTypeId);
status = -1;
}
+ celix_properties_destroy(metadata);
return status;
}