Fixes a wrongly timed mem free
@@ -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;
}
