qemu/bsd-user
Saurav Sachidanand ec45bbe5f1 util: Use g_malloc/g_free in envlist.c
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 <sauravsachidanand@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-05-07 09:57:51 +03:00
..
freebsd bsd-user: Fix syscall format, add strace support for more syscalls 2014-06-11 00:25:06 +01:00
i386 Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
netbsd Preliminary BSD user emulator support 2008-10-26 20:33:16 +00:00
openbsd Fix BSD user compilation on other than OpenBSD 2008-11-22 20:34:45 +00:00
sparc Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
sparc64 Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
x86_64 Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
bsd-mman.h Prepare for handling different BSD mmap() flags 2008-11-29 14:05:16 +00:00
bsdload.c bsd-user: Clean up includes 2016-02-04 17:01:04 +00:00
elfload.c os-posix: include sys/mman.h 2016-06-16 18:39:03 +02:00
errno_defs.h Preliminary BSD user emulator support 2008-10-26 20:33:16 +00:00
main.c util: Use g_malloc/g_free in envlist.c 2017-05-07 09:57:51 +03:00
Makefile.objs build: move *-user/ objects to nested Makefile.objs 2012-06-07 07:17:33 +02:00
mmap.c bsd-user: align use of mmap_lock to that of linux-user 2017-03-28 10:50:40 +01:00
qemu.h bsd-user: align use of mmap_lock to that of linux-user 2017-03-28 10:50:40 +01:00
signal.c bsd-user: Clean up includes 2016-02-04 17:01:04 +00:00
strace.c bsd-user: Clean up includes 2016-02-04 17:01:04 +00:00
syscall.c trace: [*-user] Add events to trace guest syscalls in syscall emulation mode 2016-06-28 21:14:12 +01:00
syscall_defs.h bsd-user: FreeBSD update 2009-10-18 15:16:08 +00:00
uaccess.c bsd-user: Suppress gcc 4.x -Wpointer-sign (included in -Wall) warning 2016-04-05 17:49:41 +01:00