dm-integrity: clean-up error handling

Add "goto bad" to error handling. This commit doesn't fix any bug, just
cleans up the code.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Assisted-by: Claude:claude-opus-4.6
This commit is contained in:
Mikulas Patocka 2026-07-13 21:24:05 +02:00
parent 70094662c1
commit 4e53905a9d

View File

@ -4634,6 +4634,7 @@ static int create_journal(struct dm_integrity_c *ic, char **error)
if (!ic->journal_tree) {
*error = "Could not allocate memory for journal tree";
r = -ENOMEM;
goto bad;
}
bad:
kfree(crypt_data);