1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

RTSP: close message header and body on fail

Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
This commit is contained in:
Andrey Gusakov 2014-08-15 08:56:13 +04:00 committed by albfan
parent 5fc9133a60
commit 066eca8638

View file

@ -1588,8 +1588,13 @@ int rtsp_message_readv(struct rtsp_message *m,
for ( ; *types; ++types) {
r = rtsp_message_readv_basic(m, *types, args);
if (r < 0)
if (r < 0) {
if (m->iter_body)
rtsp_message_exit_body(m);
if (m->iter_header)
rtsp_message_exit_header(m);
return r;
}
}
return 0;