stun: link attribute when calling stun_parse_body() with an existing list
authorDaniel-Constantin Mierla <miconda@gmail.com>
Mon, 24 Jul 2017 09:56:57 +0000 (11:56 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Mon, 24 Jul 2017 09:56:57 +0000 (11:56 +0200)
src/modules/stun/kam_stun.c

index 8257fba..350317b 100644 (file)
@@ -336,8 +336,10 @@ static int stun_parse_body(
                                        }
                                        if (*unknown == NULL) {
                                                *unknown = body = tmp_unknown;
-                                       }
-                                       else { 
+                                       } else {
+                                               if(body==NULL) {
+                                                       body = *unknown;
+                                               }
                                                body->next = tmp_unknown;
                                                body = body->next;
                                        }