Skip to content

Commit 2328860

Browse files
grooverdansvoj
authored andcommitted
ma_loghandler: translog_set_only_in_buffers failed to release lock
Release the lock for the error path. Found by Coverity (id 972093).
1 parent 051f90a commit 2328860

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

storage/maria/ma_loghandler.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2292,10 +2292,11 @@ static void translog_set_only_in_buffers(TRANSLOG_ADDRESS in_buffers)
22922292
if (cmp_translog_addr(in_buffers, log_descriptor.in_buffers_only) > 0)
22932293
{
22942294
if (translog_status != TRANSLOG_OK)
2295-
DBUG_VOID_RETURN;
2295+
goto end;
22962296
log_descriptor.in_buffers_only= in_buffers;
22972297
DBUG_PRINT("info", ("set new in_buffers_only"));
22982298
}
2299+
end:
22992300
mysql_mutex_unlock(&log_descriptor.sent_to_disk_lock);
23002301
DBUG_VOID_RETURN;
23012302
}

0 commit comments

Comments
 (0)