Mercurial > mplayer.hg
comparison stream/http.c @ 35229:1d9aaca72672
Check the correct variable for NULL.
author | reimar |
---|---|
date | Thu, 01 Nov 2012 21:31:53 +0000 |
parents | 06847bdbe4bc |
children | 8f6d3f8ffa61 |
comparison
equal
deleted
inserted
replaced
35228:ca073f3f4d4e | 35229:1d9aaca72672 |
---|---|
394 } | 394 } |
395 hdr_ptr += 4; | 395 hdr_ptr += 4; |
396 | 396 |
397 // Get the reason phrase | 397 // Get the reason phrase |
398 ptr = strstr( hdr_ptr, "\n" ); | 398 ptr = strstr( hdr_ptr, "\n" ); |
399 if( hdr_ptr==NULL ) { | 399 if( ptr==NULL ) { |
400 mp_msg(MSGT_NETWORK,MSGL_ERR,"Malformed answer. Unable to get the reason phrase.\n"); | 400 mp_msg(MSGT_NETWORK,MSGL_ERR,"Malformed answer. Unable to get the reason phrase.\n"); |
401 return -1; | 401 return -1; |
402 } | 402 } |
403 len = ptr-hdr_ptr; | 403 len = ptr-hdr_ptr; |
404 http_hdr->reason_phrase = malloc(len+1); | 404 http_hdr->reason_phrase = malloc(len+1); |