Skip to content

Commit 08b326d

Browse files
Wei Yongjunaegl
authored andcommitted
acpi/apei/erst: Add missing iounmap() on error in erst_exec_move_data()
Add the missing iounmap() before return from erst_exec_move_data() in the error handling case. Signed-off-by: Wei Yongjun <[email protected]> Acked-by: Kees Cook <[email protected]> Signed-off-by: Tony Luck <[email protected]>
1 parent b36f4be commit 08b326d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/acpi/apei/erst.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,10 @@ static int erst_exec_move_data(struct apei_exec_context *ctx,
284284
if (!src)
285285
return -ENOMEM;
286286
dst = ioremap(ctx->dst_base + offset, ctx->var2);
287-
if (!dst)
287+
if (!dst) {
288+
iounmap(src);
288289
return -ENOMEM;
290+
}
289291

290292
memmove(dst, src, ctx->var2);
291293

0 commit comments

Comments
 (0)