Skip to content
Commit 6554a56f authored by Garry McNulty's avatar Garry McNulty Committed by Richard Weinberger
Browse files

ubifs: Fix memory leak on error condition



If the call to ubifs_read_nnode() fails in ubifs_lpt_calc_hash() an
error is returned without freeing the memory allocated to 'buf'.
Read and check the root node before allocating the buffer.

Detected by CoverityScan, CID 1441025 ("Resource leak")

Signed-off-by: default avatarGarry McNulty <garrmcnu@gmail.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 60eb5da2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment