Re: [PATCH 3/6] notes: don't leak memory in git_config_get_notes_strategy

2016-03-30 Thread Junio C Hamano
Jeff King writes: > I don't think this is wrong, but would it perhaps be simpler to call > git_config_get_value() in the first place, which does not make a copy of > the string? Yup, I agree. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@

Re: [PATCH 3/6] notes: don't leak memory in git_config_get_notes_strategy

2016-03-29 Thread Jeff King
On Tue, Mar 29, 2016 at 05:38:50PM -0700, Stefan Beller wrote: > `value` is just a temporary scratchpad, so we need to make sure it doesn't > leak. It is xstrdup'd in `git_config_get_string_const` and > `parse_notes_merge_strategy` just compares the string against predefined > values, so no need t

Re: [PATCH 3/6] notes: don't leak memory in git_config_get_notes_strategy

2016-03-29 Thread Eric Sunshine
On Tue, Mar 29, 2016 at 8:38 PM, Stefan Beller wrote: > `value` is just a temporary scratchpad, so we need to make sure it doesn't > leak. It is xstrdup'd in `git_config_get_string_const` and > `parse_notes_merge_strategy` just compares the string against predefined > values, so no need to keep it

[PATCH 3/6] notes: don't leak memory in git_config_get_notes_strategy

2016-03-29 Thread Stefan Beller
`value` is just a temporary scratchpad, so we need to make sure it doesn't leak. It is xstrdup'd in `git_config_get_string_const` and `parse_notes_merge_strategy` just compares the string against predefined values, so no need to keep it around longer. Signed-off-by: Stefan Beller --- builtin/not