From 71593dfe57e2b364fb794b1dc993e029e16d57f7 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sat, 6 Feb 2010 17:30:06 +0000 Subject: OOM handling fix --- lib/rtsp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/rtsp.c') diff --git a/lib/rtsp.c b/lib/rtsp.c index 8f3218947..8aaac89ff 100644 --- a/lib/rtsp.c +++ b/lib/rtsp.c @@ -461,15 +461,17 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done) if(!Curl_checkheaders(data, "Content-Type:")) { result = Curl_add_bufferf(req_buffer, "Content-Type: text/parameters\r\n"); + if(result) + return result; } - if(result) - return result; } if(rtspreq == RTSPREQ_ANNOUNCE) { if(!Curl_checkheaders(data, "Content-Type:")) { result = Curl_add_bufferf(req_buffer, "Content-Type: application/sdp\r\n"); + if(result) + return result; } } -- cgit v1.2.3