Re: [PATCH] git.c: two memory leak fixes

2015-03-15 Thread Alexander Kuleshov
Hello Junio, >>This is technically correct, but do we really care about it? Yes, as i saw handle_alias called once, and we no need to care about it. >>I think it is wrong to free alias_string after passing it to >>split_cmdline() and while you still need to use the new_argv. Yes, right. sorry f

Re: [PATCH] git.c: two memory leak fixes

2015-03-14 Thread Junio C Hamano
Alexander Kuleshov writes: > This patch provides fixes for two minor memory leaks in the > handle_alias function: > > 1. We allocate memory for alias_argv with the xmalloc function call, > after run_command_v_opt function will be executed we no need in this > variable anymore, so let's free it.

[PATCH] git.c: two memory leak fixes

2015-03-14 Thread Alexander Kuleshov
This patch provides fixes for two minor memory leaks in the handle_alias function: 1. We allocate memory for alias_argv with the xmalloc function call, after run_command_v_opt function will be executed we no need in this variable anymore, so let's free it. 2. Memory allocated for alias_string var