Browse code

core: parser contact - link structure once finishing current one

Daniel-Constantin Mierla authored on 07/09/2021 08:44:17
Showing 1 changed files
... ...
@@ -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: