Skip to content
Commit 7992e004 authored by Wenwen Wang's avatar Wenwen Wang Committed by Richard Weinberger
Browse files

ubifs: Fix memory leak in __ubifs_node_verify_hmac error path

In __ubifs_node_verify_hmac(), 'hmac' is allocated through kmalloc().
However, it is not deallocated in the following execution if
ubifs_node_calc_hmac() fails, leading to a memory leak bug. To fix this
issue, free 'hmac' before returning the error.

Fixes: 49525e5e

 ("ubifs: Add helper functions for authentication support")
Signed-off-by: default avatarWenwen Wang <wenwen@cs.uga.edu>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent ce4d8b16
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment