[sr-dev] git:master:46c7a8c0: pv_headers: free hash entry in case of error

Daniel-Constantin Mierla miconda at gmail.com
Mon Oct 26 09:17:49 CET 2020


Module: kamailio
Branch: master
Commit: 46c7a8c0bf2b4d5c00e22a751f95f13263686445
URL: https://github.com/kamailio/kamailio/commit/46c7a8c0bf2b4d5c00e22a751f95f13263686445

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-10-26T09:17:02+01:00

pv_headers: free hash entry in case of error

---

Modified: src/modules/pv_headers/pvh_hash.c

---

Diff:  https://github.com/kamailio/kamailio/commit/46c7a8c0bf2b4d5c00e22a751f95f13263686445.diff
Patch: https://github.com/kamailio/kamailio/commit/46c7a8c0bf2b4d5c00e22a751f95f13263686445.patch

---

diff --git a/src/modules/pv_headers/pvh_hash.c b/src/modules/pv_headers/pvh_hash.c
index 89f93f77b8..80297bcaaf 100644
--- a/src/modules/pv_headers/pvh_hash.c
+++ b/src/modules/pv_headers/pvh_hash.c
@@ -85,6 +85,7 @@ int pvh_str_hash_add_key(struct str_hash_table *ht, str *key)
 
 err:
 	pvh_str_free(&e->key);
+	pkg_free(e);
 	return -1;
 }
 




More information about the sr-dev mailing list