summaryrefslogtreecommitdiffstats
path: root/stream/realrtsp/real.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/realrtsp/real.c')
-rw-r--r--stream/realrtsp/real.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/stream/realrtsp/real.c b/stream/realrtsp/real.c
index dd0f5d4461..a5b37f6e34 100644
--- a/stream/realrtsp/real.c
+++ b/stream/realrtsp/real.c
@@ -441,7 +441,10 @@ rmff_header_t *real_setup_and_get_header(rtsp_t *rtsp_session, uint32_t bandwidt
int i;
/* get challenge */
- challenge1=strdup(rtsp_search_answers(rtsp_session,"RealChallenge1"));
+ challenge1=rtsp_search_answers(rtsp_session,"RealChallenge1");
+ if (!challenge1)
+ goto out;
+ challenge1=strdup(challenge1);
#ifdef LOG
printf("real: Challenge1: %s\n", challenge1);
#endif