sequencer: plug memory leaks for the option values
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 21 Oct 2016 12:24:13 +0000 (14:24 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Oct 2016 16:31:53 +0000 (09:31 -0700)
The sequencer is our attempt to lib-ify cherry-pick. Yet it behaves
like a one-shot command when it reads its configuration: memory is
allocated and released only when the command exits.

This is kind of okay for git-cherry-pick, which *is* a one-shot
command. All the work to make the sequencer its work horse was
done to allow using the functionality as a library function, though,
including proper clean-up after use.

To remedy that, take custody of the option values in question,
allocating and duping literal constants as needed and freeing them
at end.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found