Module: kamailio
Branch: master
Commit: a9cce1772d25e1f03cec3ee291ae5fb4a945f82f
URL:
https://github.com/kamailio/kamailio/commit/a9cce1772d25e1f03cec3ee291ae5fb…
Author: Mikko Lehto <mslehto(a)iki.fi>
Committer: Mikko Lehto <mslehto(a)iki.fi>
Date: 2016-05-24T13:23:10+03:00
modules/sipcapture: fix possible NULL pointer dereference
---
Modified: modules/sipcapture/sipcapture.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a9cce1772d25e1f03cec3ee291ae5fb…
Patch:
https://github.com/kamailio/kamailio/commit/a9cce1772d25e1f03cec3ee291ae5fb…
---
diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c
index 8a3fb7b..83eae4d 100644
--- a/modules/sipcapture/sipcapture.c
+++ b/modules/sipcapture/sipcapture.c
@@ -626,13 +626,13 @@ void * capture_mode_init(str *name, str * params) {
return n;
error:
- if (n->name.s){
- pkg_free(n->name.s);
- }
- if (n->table_names){
- pkg_free(n->table_names);
- }
if (n){
+ if (n->name.s){
+ pkg_free(n->name.s);
+ }
+ if (n->table_names){
+ pkg_free(n->table_names);
+ }
pkg_free(n);
}
return 0;