Re: [Qemu-devel] [PATCH v2 4/6] block: move string allocation from stack to the heap

2015-01-22 Thread Jeff Cody
On Thu, Jan 22, 2015 at 11:37:54AM +, Stefan Hajnoczi wrote: > On Tue, Jan 20, 2015 at 12:31:31PM -0500, Jeff Cody wrote: > > Rather than allocate PATH_MAX bytes on the stack, use g_strndup() to > > dynamically allocate the string, and add an exit label for cleanup. > > > > Signed-off-by: Jeff

Re: [Qemu-devel] [PATCH v2 4/6] block: move string allocation from stack to the heap

2015-01-22 Thread Stefan Hajnoczi
On Tue, Jan 20, 2015 at 12:31:31PM -0500, Jeff Cody wrote: > Rather than allocate PATH_MAX bytes on the stack, use g_strndup() to > dynamically allocate the string, and add an exit label for cleanup. > > Signed-off-by: Jeff Cody > --- > block.c | 11 +++ > 1 file changed, 7 insertions(+)

Re: [Qemu-devel] [PATCH v2 4/6] block: move string allocation from stack to the heap

2015-01-20 Thread John Snow
On 01/20/2015 12:31 PM, Jeff Cody wrote: Rather than allocate PATH_MAX bytes on the stack, use g_strndup() to dynamically allocate the string, and add an exit label for cleanup. Signed-off-by: Jeff Cody --- block.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --g

[Qemu-devel] [PATCH v2 4/6] block: move string allocation from stack to the heap

2015-01-20 Thread Jeff Cody
Rather than allocate PATH_MAX bytes on the stack, use g_strndup() to dynamically allocate the string, and add an exit label for cleanup. Signed-off-by: Jeff Cody --- block.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index cbe4a32..39cd7a6 1