Module: kamailio
Branch: master
Commit: 3f7ccd57857c09cb76d6f21ba3b91b070e80fff8
URL:
https://github.com/kamailio/kamailio/commit/3f7ccd57857c09cb76d6f21ba3b91b0…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-06-16T09:53:59+02:00
cdp: check session pointer before use
---
Modified: src/modules/cdp/session.c
---
Diff:
https://github.com/kamailio/kamailio/commit/3f7ccd57857c09cb76d6f21ba3b91b0…
Patch:
https://github.com/kamailio/kamailio/commit/3f7ccd57857c09cb76d6f21ba3b91b0…
---
diff --git a/src/modules/cdp/session.c b/src/modules/cdp/session.c
index a8a4efb5c49..e6e23fcbcf6 100644
--- a/src/modules/cdp/session.c
+++ b/src/modules/cdp/session.c
@@ -603,8 +603,8 @@ AAASession *AAAMakeSession(int app_id, int type, str session_id)
memcpy(id.s, session_id.s, session_id.len);
id.len = session_id.len;
s = cdp_new_session(id, type);
- s->application_id = app_id;
if(s) {
+ s->application_id = app_id;
cdp_add_session(s);
}
return s;