Re: [PATCH] ar: Replace one alloca use by xmalloc

2024-05-12 Thread Mark Wielaard
Hi Aaron, On Fri, May 10, 2024 at 05:16:06PM -0400, Aaron Merey wrote: > On Tue, Apr 30, 2024 at 10:39 AM Mark Wielaard wrote: > > > > This alloca use is inside a lexical block and is used to replace one > > element of argv. Use a function local variable, xmalloc and free to > > make memory usage

Re: [PATCH] ar: Replace one alloca use by xmalloc

2024-05-10 Thread Aaron Merey
Hi Mark, On Tue, Apr 30, 2024 at 10:39 AM Mark Wielaard wrote: > > This alloca use is inside a lexical block and is used to replace one > element of argv. Use a function local variable, xmalloc and free to > make memory usage pattern more clear. > > * src/ar.c (main): Move newp char pointer d

[PATCH] ar: Replace one alloca use by xmalloc

2024-04-30 Thread Mark Wielaard
This alloca use is inside a lexical block and is used to replace one element of argv. Use a function local variable, xmalloc and free to make memory usage pattern more clear. * src/ar.c (main): Move newp char pointer declaration up. Use xmalloc to allocate space. free at end of main. Sign