Module: kamailio
Branch: master
Commit: d6c52a6afdd38cc05a67a25e55e387ad77a9ddf4
URL:
https://github.com/kamailio/kamailio/commit/d6c52a6afdd38cc05a67a25e55e387a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-09-07T10:50:40+02:00
core: parser contact - link structure once finishing current one
---
Modified: src/core/parser/contact/contact.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d6c52a6afdd38cc05a67a25e55e387a…
Patch:
https://github.com/kamailio/kamailio/commit/d6c52a6afdd38cc05a67a25e55e387a…
---
diff --git a/src/core/parser/contact/contact.c b/src/core/parser/contact/contact.c
index 650740b1a1..8c6ebdd6bb 100644
--- a/src/core/parser/contact/contact.c
+++ b/src/core/parser/contact/contact.c
@@ -262,13 +262,14 @@ int parse_contacts(str* _s, contact_t** _c)
_s->len--;
trim_leading(_s);
+ c->next = *_c;
+ *_c = c;
+ c = NULL;
+
if (_s->len == 0) {
LM_ERR("text after comma missing\n");
goto error;
}
-
- c->next = *_c;
- *_c = c;
}
error: