Re: [PATCH v5 12/44] builtin-am: implement --skip
- From
Paul Tan <pyokagan@gmail.com>
- Date
- Jul 14, 2015, 09:34 UTC
- Message-ID
- <CACRoPnRri5Nu5rj9O7id+PyiDBJpZkBDk8kB0WCuB3Uef76M3g@mail.gmail.com>
- In-Reply-To
- <CAGZ79kaWV-hMEgJ8HJP2Jgq78su+YbyBbcYD3sZ0474UUNw=pA@mail.gmail.com>
On Tue, Jul 14, 2015 at 3:05 AM, Stefan Beller <sbeller@google.com> wrote:
> All returns before this point leak the memory of `lock_file`.
Yeah, it's intentional. From Documentation/technical/api-lockfile.txt:
* Allocates a `struct lock_file` either as a static variable or on the heap, initialized to zeros. Once you use the structure to call the `hold_lock_file_*` family of functions, it belongs to the lockfile subsystem and its storage must remain valid throughout the life of the program (i.e. you cannot use an on-stack variable to hold this structure).
Thanks, Paul