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

2012-08-17 Thread Andreas Färber
Am 17.08.2012 17:34, schrieb Jim Meyering: > Andreas Färber wrote: > >> Am 17.08.2012 15:35, schrieb Jim Meyering: >>> Jim Meyering wrote: From: Jim Meyering Without this, envlist_to_environ may silently fail to copy all strings into the destination buffer, and both callers wo

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

2012-08-17 Thread Jim Meyering
Andreas Färber wrote: > Am 17.08.2012 15:35, schrieb Jim Meyering: >> Jim Meyering wrote: >>> 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 failin

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

2012-08-17 Thread Andreas Färber
Am 17.08.2012 15:35, schrieb Jim Meyering: > Jim Meyering wrote: >> 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 >> freein

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

2012-08-17 Thread Jim Meyering
Jim Meyering wrote: > 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-

[Qemu-devel] [PATCHv2 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