\Magento\MediaStorage\Model\File\Storage\Synchronization::synchronize() wrongly leaves a file in the locked state in a case of an exception

https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/MediaStorage/Model/File/Storage/Synchronization.php#L61-L68

The $file->unlock() call is absent in the exception block.

https://github.com/magento/magento2/issues/2586

See also: