diff options
author | Lukasz Marek <lukasz.m.luki@gmail.com> | 2013-10-12 14:53:54 +0400 |
---|---|---|
committer | Lukasz Marek <lukasz.m.luki@gmail.com> | 2013-10-12 15:52:33 +0400 |
commit | e1fb3143bb3a6006612fe0e1d1a15c8eb4955802 (patch) | |
tree | 2ad6e2ebf1af25269e1d72e97a1fa7792cc0751d /libavformat/ftp.c | |
parent | 7b1640c4a6e9cdb41a09ed016b3147405a487ef1 (diff) |
avformat/ftp: fix possible deadlock
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Diffstat (limited to 'libavformat/ftp.c')
-rw-r--r-- | libavformat/ftp.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/libavformat/ftp.c b/libavformat/ftp.c index eb3827fa35..aaa94105e5 100644 --- a/libavformat/ftp.c +++ b/libavformat/ftp.c @@ -486,14 +486,13 @@ static int ftp_abort(URLContext *h) } } else { ftp_close_data_connection(s); - } - - if (ftp_status(s, NULL, abor_codes) < 225) { - /* wu-ftpd also closes control connection after data connection closing */ - ffurl_closep(&s->conn_control); - if ((err = ftp_connect_control_connection(h)) < 0) { - av_log(h, AV_LOG_ERROR, "Reconnect failed.\n"); - return err; + if (ftp_status(s, NULL, abor_codes) < 225) { + /* wu-ftpd also closes control connection after data connection closing */ + ffurl_closep(&s->conn_control); + if ((err = ftp_connect_control_connection(h)) < 0) { + av_log(h, AV_LOG_ERROR, "Reconnect failed.\n"); + return err; + } } } |