On 22 March 2016 at 16:15, haris iqbal <haris.p...@gmail.com> wrote:
> One more question. About tracking down g_free(). I thought of
> submitting for linux-user/qemu.h first. As it is done in a function
> called lock_user(), which is called by many other functions (around
> 144, too many to be checked manually). The interesting part is, the
> free is done by a pair function called unlock_user(). I just want to
> ask if all those lock_user() calls has a matching unlock_user() call
> to free() the malloc(), or there is a hidden free somewhere else also?
> This would save a lot of time. Thanks.

lock_user and unlock_user should always match. (In particular
lock_user will only malloc if DEBUG_REMAP is defined, which it
is not by default, so callers can't be free()ing by mistake.)

thanks
-- PMM

Reply via email to