You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2018/10/16 15:13:10 UTC

celix git commit: CELIX-454: Fixes a wrongly timed mem free

Repository: celix
Updated Branches:
  refs/heads/develop 24def6839 -> 23d9c0ac4


CELIX-454: Fixes a wrongly timed mem free


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/23d9c0ac
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/23d9c0ac
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/23d9c0ac

Branch: refs/heads/develop
Commit: 23d9c0ac40391173eb6c9309a5ccf1d7099f3d1e
Parents: 24def68
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Oct 16 17:12:40 2018 +0200
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Oct 16 17:12:40 2018 +0200

----------------------------------------------------------------------
 bundles/pubsub/pubsub_spi/src/pubsub_utils_match.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/23d9c0ac/bundles/pubsub/pubsub_spi/src/pubsub_utils_match.c
----------------------------------------------------------------------
diff --git a/bundles/pubsub/pubsub_spi/src/pubsub_utils_match.c b/bundles/pubsub/pubsub_spi/src/pubsub_utils_match.c
index 1542e4f..dc5c35e 100644
--- a/bundles/pubsub/pubsub_spi/src/pubsub_utils_match.c
+++ b/bundles/pubsub/pubsub_spi/src/pubsub_utils_match.c
@@ -175,8 +175,6 @@ double pubsub_utils_matchSubscriber(
 		requested_admin = celix_properties_get(ep, PUBSUB_ENDPOINT_ADMIN_TYPE, NULL);
 		requested_qos = celix_properties_get(ep, PUBSUB_UTILS_QOS_ATTRIBUTE_KEY, NULL);
 		requested_serializer = celix_properties_get(ep, PUBSUB_ENDPOINT_SERIALIZER, NULL);
-		celix_properties_destroy(ep);
-		data.outEndpoint = NULL;
 	}
 
 	double score = getPSAScore(requested_admin, requested_qos, adminType, sampleScore, controlScore, defaultScore);
@@ -190,6 +188,10 @@ double pubsub_utils_matchSubscriber(
 		*outSerializerSvcId = serializerSvcId;
 	}
 
+	if (ep != NULL) {
+		celix_properties_destroy(ep);
+	}
+
 	return score;
 }