Re: [Qemu-devel] [PATCHv3 2/2] envlist.c: handle strdup failure

2012-08-17 Thread Jim Meyering
Andreas Färber wrote: > Am 22.05.2012 12:16, schrieb Jim Meyering: >> From: Jim Meyering >> >> Without this, envlist_to_environ may silently fail to copy all >> strings into the destination buffer, and both callers would leak >> any env strings allocated after a failing strdup, because the >> free

Re: [Qemu-devel] [PATCHv3 2/2] envlist.c: handle strdup failure

2012-08-17 Thread Andreas Färber
Am 22.05.2012 12:16, schrieb Jim Meyering: > From: Jim Meyering > > Without this, envlist_to_environ may silently fail to copy all > strings into the destination buffer, and both callers would leak > any env strings allocated after a failing strdup, because the > freeing code stops at the first N

[Qemu-devel] [PATCHv3 2/2] envlist.c: handle strdup failure

2012-05-22 Thread Jim Meyering
From: Jim Meyering Without this, envlist_to_environ may silently fail to copy all strings into the destination buffer, and both callers would leak any env strings allocated after a failing strdup, because the freeing code stops at the first NULL pointer. Signed-off-by: Jim Meyering --- envlist