You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by oi...@apache.org on 2020/12/04 13:40:12 UTC

[celix] branch master updated: Fix memory leak

This is an automated email from the ASF dual-hosted git repository.

oipo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to refs/heads/master by this push:
     new 40e33da  Fix memory leak
40e33da is described below

commit 40e33daaeb12f3bc38d19a477a861ffffe72b734
Author: Michael de Lang <ki...@gmail.com>
AuthorDate: Thu Dec 3 16:01:02 2020 +0100

    Fix memory leak
---
 bundles/remote_services/discovery_etcd/src/discovery_impl.c | 1 +
 bundles/remote_services/discovery_shm/src/discovery_impl.c  | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/bundles/remote_services/discovery_etcd/src/discovery_impl.c b/bundles/remote_services/discovery_etcd/src/discovery_impl.c
index fa0c902..0294e80 100644
--- a/bundles/remote_services/discovery_etcd/src/discovery_impl.c
+++ b/bundles/remote_services/discovery_etcd/src/discovery_impl.c
@@ -103,6 +103,7 @@ celix_status_t discovery_destroy(discovery_t *discovery) {
 
     celix_logHelper_destroy(discovery->loghelper);
 
+    free(discovery->pImpl);
     free(discovery);
 
     return status;
diff --git a/bundles/remote_services/discovery_shm/src/discovery_impl.c b/bundles/remote_services/discovery_shm/src/discovery_impl.c
index 4e4475b..cc6751d 100644
--- a/bundles/remote_services/discovery_shm/src/discovery_impl.c
+++ b/bundles/remote_services/discovery_shm/src/discovery_impl.c
@@ -107,9 +107,7 @@ celix_status_t discovery_destroy(discovery_t *discovery) {
 
 	celixThreadMutex_destroy(&discovery->listenerReferencesMutex);
 
-
-
-
+    free(discovery->pImpl);
 	free(discovery);
 
 	return status;