[sr-dev] git:5.4:82ff4f40: pv_headers: free hash entry in case of error

Daniel-Constantin Mierla miconda at gmail.com
Mon Oct 26 11:03:56 CET 2020


Module: kamailio
Branch: 5.4
Commit: 82ff4f40455a910ef42dd3692af5c1c9dfb8d4c1
URL: https://github.com/kamailio/kamailio/commit/82ff4f40455a910ef42dd3692af5c1c9dfb8d4c1

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

pv_headers: free hash entry in case of error

(cherry picked from commit 46c7a8c0bf2b4d5c00e22a751f95f13263686445)

---

Modified: src/modules/pv_headers/pvh_hash.c

---

Diff:  https://github.com/kamailio/kamailio/commit/82ff4f40455a910ef42dd3692af5c1c9dfb8d4c1.diff
Patch: https://github.com/kamailio/kamailio/commit/82ff4f40455a910ef42dd3692af5c1c9dfb8d4c1.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