avformat/http: Fix null check on allocated value

probably fixes CID 1292299

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Himangi Saraogi 2015-03-31 12:53:25 +05:30 committed by Michael Niedermayer
parent 8b152c355f
commit 919d13d238
1 changed files with 1 additions and 1 deletions

View File

@ -495,7 +495,7 @@ static int cookie_string(AVDictionary *dict, char **cookies)
e = NULL; e = NULL;
if (*cookies) av_free(*cookies); if (*cookies) av_free(*cookies);
*cookies = av_malloc(len); *cookies = av_malloc(len);
if (!cookies) return AVERROR(ENOMEM); if (!*cookies) return AVERROR(ENOMEM);
*cookies[0] = '\0'; *cookies[0] = '\0';
// write out the cookies // write out the cookies