lavf/ftp: fix possible crash

(cherry picked from commit f3ace37a3b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Lukasz Marek
2013-08-29 01:54:04 +02:00
committed by Michael Niedermayer
parent a1b32533aa
commit 0cabb95811
+2 -1
View File
@@ -133,7 +133,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;
}