[MPlayer-cvslog] r19601 - trunk/stream/librtsp/rtsp_session.c
rtogni
subversion at mplayerhq.hu
Wed Aug 30 22:18:27 CEST 2006
Author: rtogni
Date: Wed Aug 30 22:18:27 2006
New Revision: 19601
Modified:
trunk/stream/librtsp/rtsp_session.c
Log:
Avoid a potential strdup(NULL)
Fix sig11 with rtsp://wms.stream.aol.com/aol/us/moviefone/movies/2006/jesuscamp_027214/prestigethe_trlr_01_460.wmv
Modified: trunk/stream/librtsp/rtsp_session.c
==============================================================================
--- trunk/stream/librtsp/rtsp_session.c (original)
+++ trunk/stream/librtsp/rtsp_session.c Wed Aug 30 22:18:27 2006
@@ -155,9 +155,7 @@
char *public = NULL;
/* look for the Public: field in response to RTSP OPTIONS */
- public = strdup (rtsp_search_answers (rtsp_session->s,
- RTSP_OPTIONS_PUBLIC));
- if (!public)
+ if (!(public = rtsp_search_answers (rtsp_session->s, RTSP_OPTIONS_PUBLIC)))
{
rtsp_close (rtsp_session->s);
free (server);
@@ -172,7 +170,6 @@
|| !strstr (public, RTSP_METHOD_PLAY)
|| !strstr (public, RTSP_METHOD_TEARDOWN))
{
- free (public);
mp_msg (MSGT_OPEN, MSGL_ERR,
"Remote server does not meet minimal RTSP 1.0 compliance.\n");
rtsp_close (rtsp_session->s);
@@ -182,7 +179,6 @@
return NULL;
}
- free (public);
rtsp_session->rtp_session = rtp_setup_and_play (rtsp_session->s);
/* neither a Real or an RTP server */
More information about the MPlayer-cvslog
mailing list