Revision 701ea516 libavformat/http.c

View differences:

libavformat/http.c
131 131
 fail:
132 132
    if (hd)
133 133
        url_close(hd);
134
    s->hd = NULL;
134 135
    return AVERROR(EIO);
135 136
}
136 137

  
......
149 150
    s->chunksize = -1;
150 151
    s->off = 0;
151 152
    s->init = 0;
153
    s->hd = NULL;
152 154
    *s->headers = '\0';
153 155
    memset(&s->auth_state, 0, sizeof(s->auth_state));
154 156
    av_strlcpy(s->location, uri, URL_SIZE);
......
452 454
        ret = ret > 0 ? 0 : ret;
453 455
    }
454 456

  
455
    url_close(s->hd);
457
    if (s->hd)
458
        url_close(s->hd);
456 459
    av_free(s);
457 460
    return ret;
458 461
}

Also available in: Unified diff