[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-trivial] [PATCH v5] util: Use g_malloc/g_free in
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [Qemu-trivial] [PATCH v5] util: Use g_malloc/g_free in envlist.c |
Date: |
Thu, 23 Mar 2017 08:34:16 +0000 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Mon, Mar 20, 2017 at 05:38:28PM +0000, 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.
>
> Free array and array contents returned by envlist_to_environ using
> g_free in bsd-user/main.c and linux-user/main.c.
>
> Update comments to reflect change in semantics.
>
> Signed-off-by: Saurav Sachidanand <address@hidden>
> ---
> bsd-user/main.c | 14 ++++----------
> linux-user/main.c | 9 +++------
> util/envlist.c | 47 +++++++++++++++++++----------------------------
> 3 files changed, 26 insertions(+), 44 deletions(-)
Reviewed-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature