commit | 26e7e982b267e71d40cd20e9e234fedef6770a90 | [log] [tgz] |
---|---|---|
author | Leon Alrae <leon.alrae@imgtec.com> | Tue Jul 14 11:08:15 2015 +0100 |
committer | Leon Alrae <leon.alrae@imgtec.com> | Wed Jul 15 14:07:25 2015 +0100 |
tree | fad74f2bf3bebc3365ebdfb7108c0c3d4582d2fa | |
parent | 47ada0ad3431b39863918dc80386634693d317b5 [diff] |
target-mips: fix resource leak reported by Coverity UHI assert and link operations call lock_user_string() twice to obtain two strings pointed by gpr[4] and gpr[5]. If the second lock_user_string() fails, then the first one won't get freed. Fix this by introducing another macro responsible for obtaining two strings and handling allocation failure. Signed-off-by: Leon Alrae <leon.alrae@imgtec.com> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>