Re: [Qemu-devel] [Qemu-trivial] [PATCH v4] util: Use g_malloc/g_free in envlist.c

2017-03-20 Thread Saurav Sachidanand
On Mon, Mar 20, 2017 at 5:32 PM, Saurav Sachidanand wrote: > Change malloc/strdup/free to g_malloc/g_strdup/g_free in > util/envlist.c. > > Remove NULL checks for pointers returned from g_malloc and g_strdup > as they exit in case of failure. Also, update calls to envlist_create > to reflect this.

[Qemu-devel] [Qemu-trivial] [PATCH v4] util: Use g_malloc/g_free in envlist.c

2017-03-20 Thread Saurav Sachidanand
Change malloc/strdup/free to g_malloc/g_strdup/g_free in util/envlist.c. Remove NULL checks for pointers returned from g_malloc and g_strdup as they exit in case of failure. Also, update calls to envlist_create to reflect this. Free array and array contents returned by envlist_to_environ using g_