(cherry picked from commit d6c52a6afdd38cc05a67a25e55e387ad77a9ddf4)
... | ... |
@@ -262,13 +262,14 @@ int parse_contacts(str* _s, contact_t** _c) |
262 | 262 |
_s->len--; |
263 | 263 |
trim_leading(_s); |
264 | 264 |
|
265 |
+ c->next = *_c; |
|
266 |
+ *_c = c; |
|
267 |
+ c = NULL; |
|
268 |
+ |
|
265 | 269 |
if (_s->len == 0) { |
266 | 270 |
LM_ERR("text after comma missing\n"); |
267 | 271 |
goto error; |
268 | 272 |
} |
269 |
- |
|
270 |
- c->next = *_c; |
|
271 |
- *_c = c; |
|
272 | 273 |
} |
273 | 274 |
|
274 | 275 |
error: |