Commit f3ace37a authored by Lukasz Marek's avatar Lukasz Marek

lavf/ftp: fix possible crash

parent c4810fbe
......@@ -128,7 +128,8 @@ static int ftp_status(FTPContext *s, char **line, const int response_codes[])
while (!code_found || dash) {
if ((err = ftp_get_line(s, buf, sizeof(buf))) < 0) {
av_bprint_finalize(&line_buffer, NULL);
if (line)
av_bprint_finalize(&line_buffer, NULL);
return err;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment