On 12/16/2011 10:41 AM, Daniel P. Berrange wrote:
Yes& no. In general you are correct that g_malloc/g_strdup needs to
be matched with g_free, but in the context of the QEMU binary at least
we don't strictly need that.
The general issue is that GLib's memory allocators default to the
system mall
On Fri, Dec 16, 2011 at 10:26:33AM +0100, Paolo Bonzini wrote:
> On 12/16/2011 09:07 AM, Jun Koi wrote:
> >This patch replaces all the strdup() with g_strdup()
> >
> >Signed-off-by: Jun Koi
> >
> >$ diffstat strdup.diff
> > cmd.c |4 ++--
> > envlist.c |6 +++---
> >
On 12/16/2011 09:07 AM, Jun Koi wrote:
This patch replaces all the strdup() with g_strdup()
Signed-off-by: Jun Koi
$ diffstat strdup.diff
cmd.c |4 ++--
envlist.c |6 +++---
exec.c |2 +-
hw/isa-bus.c|2 +-
hw/pc.c |
On 16 December 2011 08:07, Jun Koi wrote:
> This patch replaces all the strdup() with g_strdup()
I don't think you can do this as a pure search-and-replace.
For example this change:
> --- a/envlist.c
> +++ b/envlist.c
> @@ -109,7 +109,7 @@ envlist_parse(envlist_t *envlist, const char *env,
>
Hi,
You can check http://wiki.qemu.org/Contribute/SubmitAPatch to see how to send
patch to qemu-devel. :)
Regards,
chenwj
--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.ed
This patch replaces all the strdup() with g_strdup()
Signed-off-by: Jun Koi
$ diffstat strdup.diff
cmd.c |4 ++--
envlist.c |6 +++---
exec.c |2 +-
hw/isa-bus.c|2 +-
hw/pc.c |2 +-
hw/pci.c|2 +-
hw/q