Re: [Qemu-devel] [PATCH v8] slirp/misc: Use the GLib memory allocation APIs

2014-08-20 Thread zhanghailiang
On 2014/8/20 23:03, Michael Tokarev wrote: 20.08.2014 18:57, Michael Tokarev пишет: 19.08.2014 12:30, zhanghailiang wrote: Here we don't check the return value of malloc() which may fail. Use the g_new() instead, which will abort the program when there is not enough memory. Also, use g_strdup

Re: [Qemu-devel] [PATCH v8] slirp/misc: Use the GLib memory allocation APIs

2014-08-20 Thread Michael Tokarev
20.08.2014 18:57, Michael Tokarev пишет: > 19.08.2014 12:30, zhanghailiang wrote: >> Here we don't check the return value of malloc() which may fail. >> Use the g_new() instead, which will abort the program when >> there is not enough memory. >> >> Also, use g_strdup instead of strdup and remove th

Re: [Qemu-devel] [PATCH v8] slirp/misc: Use the GLib memory allocation APIs

2014-08-20 Thread Michael Tokarev
19.08.2014 12:30, zhanghailiang wrote: > Here we don't check the return value of malloc() which may fail. > Use the g_new() instead, which will abort the program when > there is not enough memory. > > Also, use g_strdup instead of strdup and remove the unnecessary > strdup function. I also will r

Re: [Qemu-devel] [PATCH v8] slirp/misc: Use the GLib memory allocation APIs

2014-08-20 Thread Benoît Canet
The Tuesday 19 Aug 2014 à 16:30:17 (+0800), zhanghailiang wrote : > Here we don't check the return value of malloc() which may fail. > Use the g_new() instead, which will abort the program when > there is not enough memory. > > Also, use g_strdup instead of strdup and remove the unnecessary > strd

[Qemu-devel] [PATCH v8] slirp/misc: Use the GLib memory allocation APIs

2014-08-19 Thread zhanghailiang
Here we don't check the return value of malloc() which may fail. Use the g_new() instead, which will abort the program when there is not enough memory. Also, use g_strdup instead of strdup and remove the unnecessary strdup function. Signed-off-by: zhanghailiang Reviewed-by: Alex Bennée --- sli