Re: [PATCH v2 3/3] unpack_trees_options: free messages when done

2018-05-17 Thread Martin Ågren
On 18 May 2018 at 00:10, Junio C Hamano wrote: > Martin Ågren writes: > >> The `opts` string array contains multiple copies of the same pointers. >> Be careful to only free each pointer once, then zeroize the whole array >> so that we do not leave any

Re: [PATCH v2 3/3] unpack_trees_options: free messages when done

2018-05-17 Thread Junio C Hamano
Martin Ågren writes: > The strings allocated in `setup_unpack_trees_porcelain()` are never > freed. Provide a function `clear_unpack_trees_porcelain()` to do so and > call it where we use `setup_unpack_trees_porcelain()`. The only > non-trivial user is

[PATCH v2 3/3] unpack_trees_options: free messages when done

2018-05-16 Thread Martin Ågren
The strings allocated in `setup_unpack_trees_porcelain()` are never freed. Provide a function `clear_unpack_trees_porcelain()` to do so and call it where we use `setup_unpack_trees_porcelain()`. The only non-trivial user is `unpack_trees_start()`, where we should place the new call in