[sr-dev] git:5.1:7219170e: domain: fix memory leak on domain reload (related to domain_attr table, struct domain_list)

Henning Westerholt hw at skalatan.de
Fri Aug 9 11:24:18 CEST 2019


Module: kamailio
Branch: 5.1
Commit: 7219170e7def71eeb6a63ec7e278adf5a795886c
URL: https://github.com/kamailio/kamailio/commit/7219170e7def71eeb6a63ec7e278adf5a795886c

Author: Henning Westerholt <hw at skalatan.de>
Committer: Henning Westerholt <hw at skalatan.de>
Date: 2019-08-09T11:23:49+02:00

domain: fix memory leak on domain reload (related to domain_attr table, struct domain_list)

- fix memory leak on domain reload, reported by Mack Hendricks
- related to domain_attr table, structure domain_list

(cherry picked from commit f50177003c21f53564be6349c0bb4935be184e2d)

---

Modified: src/modules/domain/hash.c

---

Diff:  https://github.com/kamailio/kamailio/commit/7219170e7def71eeb6a63ec7e278adf5a795886c.diff
Patch: https://github.com/kamailio/kamailio/commit/7219170e7def71eeb6a63ec7e278adf5a795886c.patch

---

diff --git a/src/modules/domain/hash.c b/src/modules/domain/hash.c
index 257d374dba..b093dbc3e4 100644
--- a/src/modules/domain/hash.c
+++ b/src/modules/domain/hash.c
@@ -204,6 +204,7 @@ void hash_table_free(struct domain_list **hash_table)
 			shm_free(ap);
 			ap = next_ap;
 		}
+		shm_free(np);
 		np = np->next;
 	}
 




More information about the sr-dev mailing list