fs/squashfs: sqfs_get_abs_path: fix possible memory leak on error 81/250881/1
authorRichard Genoud <richard.genoud@posteo.net>
Tue, 3 Nov 2020 11:11:17 +0000 (12:11 +0100)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 5 Jan 2021 07:10:23 +0000 (16:10 +0900)
commit32ec9929bbf41ecc85ae71a2ef7894036a6dd3d2
treeb020a81ce5f2f43b1b9961739e241659215900b5
parent9e9a13d62c46088ac89528424f370517dcd382be
fs/squashfs: sqfs_get_abs_path: fix possible memory leak on error

if  sqfs_tokenize(rel_tokens, rc, rel); fails, the function exits
without freeing the array base_tokens.

Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit 33686804d29e676177d408f1ce047b8c35185ddb]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I377f5aeda3ed3f6b889ce9f9c506629c21f45d3d
fs/squashfs/sqfs.c