celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1658679 - /celix/trunk/framework/private/src/framework.c
Date Tue, 10 Feb 2015 11:24:47 GMT
Author: abroekhuis
Date: Tue Feb 10 11:24:46 2015
New Revision: 1658679

URL: http://svn.apache.org/r1658679
Log:
CELIX-218: Fixed memory leaks in the framework due to missing usage of serviceReference_unget.

Modified:
    celix/trunk/framework/private/src/framework.c

Modified: celix/trunk/framework/private/src/framework.c
URL: http://svn.apache.org/viewvc/celix/trunk/framework/private/src/framework.c?rev=1658679&r1=1658678&r2=1658679&view=diff
==============================================================================
--- celix/trunk/framework/private/src/framework.c (original)
+++ celix/trunk/framework/private/src/framework.c Tue Feb 10 11:24:46 2015
@@ -1243,6 +1243,7 @@ celix_status_t fw_registerService(framew
                     hook->added(hook->handle, infos);
                 }
                 status = CELIX_DO_IF(status, serviceRegistry_ungetService(framework->registry,
framework->bundle, ref, &ungetResult));
+                status = CELIX_DO_IF(status, serviceRegistry_ungetServiceReference(framework->registry,
framework->bundle, ref));
 
                 int i = 0;
                 for (i = 0; i < arrayList_size(infos); i++) {
@@ -1380,6 +1381,7 @@ void fw_addServiceListener(framework_pt
 		arrayList_add(infos, info);
 		hook->added(hook->handle, infos);
 		serviceRegistry_ungetService(framework->registry, framework->bundle, ref, &ungetResult);
+		serviceRegistry_ungetServiceReference(framework->registry, framework->bundle, ref);
 		arrayList_destroy(infos);
 	}
 
@@ -1442,6 +1444,7 @@ void fw_removeServiceListener(framework_
 			arrayList_add(infos, info);
 			hook->removed(hook->handle, infos);
 			serviceRegistry_ungetService(framework->registry, framework->bundle, ref, &ungetResult);
+			serviceRegistry_ungetServiceReference(framework->registry, framework->bundle, ref);
 			arrayList_destroy(infos);
 		}
 



Mime
View raw message