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

Author: Mikko Lehto <msle...@iki.fi>
Committer: Mikko Lehto <msle...@iki.fi>
Date: 2016-05-24T13:21:25+03:00

modules/rr: initialize to NULL

---

Modified: modules/rr/record.c

---

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

---

diff --git a/modules/rr/record.c b/modules/rr/record.c
index b8f526e..6c7cc05 100644
--- a/modules/rr/record.c
+++ b/modules/rr/record.c
@@ -492,7 +492,7 @@ int record_route(struct sip_msg* _m, str *params)
 int record_route_preset(struct sip_msg* _m, str* _data)
 {
        str user = {NULL, 0};
-       struct to_body* from;
+       struct to_body* from = NULL;
        struct lump* l;
        char* hdr, *p;
        int hdr_len;
@@ -511,10 +511,6 @@ int record_route_preset(struct sip_msg* _m, str* _data)
                rr_prefix_len = RR_PREFIX_SIPS_LEN;
        }
 
-       from = 0;
-       user.len = 0;
-       user.s = 0;
-
        if (add_username) {
                if (get_username(_m, &user) < 0) {
                        LM_ERR("failed to extract username\n");


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to