From: Alexander Kanavin Date: Fri, 30 Apr 2021 21:45:56 +0000 (+0200) Subject: libext2fs: fix missing mutex unlock in an error path of the Unix I/O manager X-Git-Tag: archive/debian/1.46.2-2~2 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c9b85b3453d54181cf0bb9beab4056ccff7d1733;p=tools%2Fe2fsprogs.git libext2fs: fix missing mutex unlock in an error path of the Unix I/O manager Originally from https://github.com/tytso/e2fsprogs/pull/68 Signed-off-by: Alexander Kanavin Signed-off-by: Theodore Ts'o --- diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c index 64eee34..528c2fb 100644 --- a/lib/ext2fs/unix_io.c +++ b/lib/ext2fs/unix_io.c @@ -398,7 +398,7 @@ static errcode_t raw_write_blk(io_channel channel, mutex_lock(data, BOUNCE_MTX); if (ext2fs_llseek(data->dev, location, SEEK_SET) < 0) { retval = errno ? errno : EXT2_ET_LLSEEK_FAILED; - goto error_out; + goto error_unlock; } actual = write(data->dev, buf, size); mutex_unlock(data, BOUNCE_MTX);