Re: [PATCH 06/22] sequencer: release memory that was allocated when reading options
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Aug 30, 2016, 20:46 UTC
- Message-ID
- <e07303b5-028a-6804-7471-356e0b7293d0@kdbg.org>
- In-Reply-To
- <alpine.DEB.2.20.1608301948310.129229@virtualbox>
Am 30.08.2016 um 19:52 schrieb Johannes Schindelin:
> Right, but that is exactly what I wanted to avoid, because it is rather > inelegant to strdup() strings just so that we do not have to record what > to free() and what not to free().
Please, excuse, but when I have to choose what is more "elegant":
1. strdup() sometimes so that I can later free() always 2. use sequencer_entrust()
I would choose 1. at all times.
Particularly in this case: parsing options does not sound like a major drain of resources, neither CPU- nor memory-wise.
-- Hannes