Re: [Qemu-devel] [PATCH] target-mips: fix resource leak reported by Coverity

2015-07-14 Thread Aurelien Jarno
On 2015-07-14 11:08, Leon Alrae wrote: > 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

[Qemu-devel] [PATCH] target-mips: fix resource leak reported by Coverity

2015-07-14 Thread Leon Alrae
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.