parser/sdp: prevent manipulation with freed structure
authorMichal Karas <largon@largon.net>
Thu, 12 Jul 2012 15:38:15 +0000 (17:38 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 13 Jul 2012 07:41:50 +0000 (09:41 +0200)
- FS#244

parser/sdp/sdp.c

index 0ba8e8f..fbd2453 100644 (file)
@@ -719,6 +719,7 @@ int parse_sdp(struct sip_msg* _m)
                        if (res != 0) {
                                LM_DBG("free_sdp\n");
                                free_sdp((sdp_info_t**)(void*)&_m->body);
+                                return res;
                        }
                        /* The whole body is SDP */
                        ((sdp_info_t*)_m->body)->raw_sdp.s = body.s;