celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpe...@apache.org
Subject svn commit: r1643882 - in /celix/trunk: examples/echo_service/client/private/src/echo_client_activator.c framework/private/src/service_tracker.c
Date Mon, 08 Dec 2014 18:24:48 GMT
Author: bpetri
Date: Mon Dec  8 18:24:47 2014
New Revision: 1643882

URL: http://svn.apache.org/r1643882
Log:
some minor memory leak fixes

Modified:
    celix/trunk/examples/echo_service/client/private/src/echo_client_activator.c
    celix/trunk/framework/private/src/service_tracker.c

Modified: celix/trunk/examples/echo_service/client/private/src/echo_client_activator.c
URL: http://svn.apache.org/viewvc/celix/trunk/examples/echo_service/client/private/src/echo_client_activator.c?rev=1643882&r1=1643881&r2=1643882&view=diff
==============================================================================
--- celix/trunk/examples/echo_service/client/private/src/echo_client_activator.c (original)
+++ celix/trunk/examples/echo_service/client/private/src/echo_client_activator.c Mon Dec 
8 18:24:47 2014
@@ -75,7 +75,10 @@ celix_status_t bundleActivator_stop(void
 
 celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt context) {
 	struct echoActivator * act = (struct echoActivator *) userData;
+	serviceTracker_destroy(act->tracker);
 	echoClient_destroy(act->client);
 
+	free(act);
+
 	return CELIX_SUCCESS;
 }

Modified: celix/trunk/framework/private/src/service_tracker.c
URL: http://svn.apache.org/viewvc/celix/trunk/framework/private/src/service_tracker.c?rev=1643882&r1=1643881&r2=1643882&view=diff
==============================================================================
--- celix/trunk/framework/private/src/service_tracker.c (original)
+++ celix/trunk/framework/private/src/service_tracker.c Mon Dec  8 18:24:47 2014
@@ -86,6 +86,13 @@ celix_status_t serviceTracker_destroy(se
 	}
 	arrayList_destroy(tracker->tracked);
 
+	if (tracker->listener != NULL) {
+		free (tracker->listener);
+	}
+
+	free(tracker->filter);
+	free(tracker);
+
 	return CELIX_SUCCESS;
 }
 



Mime
View raw message