Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d8757c6 authored by Greg Hackmann's avatar Greg Hackmann Committed by Amit Pundir
Browse files

ANDROID: dm: android-verity: fix table_make_digest() error handling



If table_make_digest() fails, verify_verity_signature() would try to
pass the returned ERR_PTR() to kfree().

This fixes the smatch error:

drivers/md/dm-android-verity.c:601 verify_verity_signature() error: 'pks' dereferencing possible ERR_PTR()

Change-Id: I9b9b7764b538cb4a5f94337660e9b0f149b139be
Signed-off-by: default avatarGreg Hackmann <ghackmann@google.com>
parent 539de6b3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -585,6 +585,8 @@ static int verify_verity_signature(char *key_id,

	if (IS_ERR(pks)) {
		DMERR("hashing failed");
		retval = PTR_ERR(pks);
		pks = NULL;
		goto error;
	}