From: Li Liu <john.liuli@huawei.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [PATCH] numa: fix qerror_report_err not free issue
Date: Sat, 30 Aug 2014 14:24:28 +0800 [thread overview]
Message-ID: <54016E1C.1090207@huawei.com> (raw)
In-Reply-To: <54016069.4070209@msgid.tls.msk.ru>
On 2014/8/30 13:26, Michael Tokarev wrote:
> 30.08.2014 07:36, john.liuli wrote:
>> From: Li Liu <john.liuli@huawei.com>
>>
>> All qerror_report_err returned none NULL pointers need to
>> be freed, otherwise will cause memory leaking.
>>
>> Although this place did not cause real memory leaking by exit,
>> obviously it's not correct to use qerror_report_err
>> without error_free it.
>
> I don't thing there's any good reason to free resources like
> this (freeing memory, closing files, etc) right before exit()
> (esp. in error path). The OS will do that for us in one go
> much faster.
>
Yes, the OS will do that for us. But if someone refer to this code
to use qerror_report_err, it will give a bad hint. Of cause this
patch is just a suggestion.
Best regards
Li.
> /mjt
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Li Liu <john.liuli@huawei.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] numa: fix qerror_report_err not free issue
Date: Sat, 30 Aug 2014 14:24:28 +0800 [thread overview]
Message-ID: <54016E1C.1090207@huawei.com> (raw)
In-Reply-To: <54016069.4070209@msgid.tls.msk.ru>
On 2014/8/30 13:26, Michael Tokarev wrote:
> 30.08.2014 07:36, john.liuli wrote:
>> From: Li Liu <john.liuli@huawei.com>
>>
>> All qerror_report_err returned none NULL pointers need to
>> be freed, otherwise will cause memory leaking.
>>
>> Although this place did not cause real memory leaking by exit,
>> obviously it's not correct to use qerror_report_err
>> without error_free it.
>
> I don't thing there's any good reason to free resources like
> this (freeing memory, closing files, etc) right before exit()
> (esp. in error path). The OS will do that for us in one go
> much faster.
>
Yes, the OS will do that for us. But if someone refer to this code
to use qerror_report_err, it will give a bad hint. Of cause this
patch is just a suggestion.
Best regards
Li.
> /mjt
>
>
next prev parent reply other threads:[~2014-08-30 6:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-30 3:36 [Qemu-trivial] [PATCH] numa: fix qerror_report_err not free issue john.liuli
2014-08-30 3:36 ` [Qemu-devel] " john.liuli
2014-08-30 5:26 ` [Qemu-trivial] " Michael Tokarev
2014-08-30 5:26 ` [Qemu-devel] " Michael Tokarev
2014-08-30 5:28 ` [Qemu-trivial] " Gonglei (Arei)
2014-08-30 5:28 ` Gonglei (Arei)
2014-08-30 6:24 ` Li Liu [this message]
2014-08-30 6:24 ` Li Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54016E1C.1090207@huawei.com \
--to=john.liuli@huawei.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.