On 04/02/2014 09:06 AM, Eric Sunshine wrote: > On Tue, Apr 1, 2014 at 11:58 AM, Michael Haggerty <mhagger@xxxxxxxxxxxx> wrote: >> Signed-off-by: Michael Haggerty <mhagger@xxxxxxxxxxxx> >> --- >> lockfile.c | 31 ++++++++++++++++--------------- >> 1 file changed, 16 insertions(+), 15 deletions(-) >> >> diff --git a/lockfile.c b/lockfile.c >> index 852d717..c06e134 100644 >> --- a/lockfile.c >> +++ b/lockfile.c >> @@ -85,6 +85,14 @@ static void remove_lock_file_on_signal(int signo) >> raise(signo); >> } >> >> +static void reset_lock_file(struct lock_file *lk) >> +{ >> + lk->fd = -1; >> + strbuf_setlen(&lk->filename, 0); >> + strbuf_setlen(&lk->staging_filename, 0); > > strbuf_reset() perhaps? Thanks, Eric. For some reason I always have it in the back of my head that strbuf_reset() frees the memory associated with the strbuf, but of course that is strbuf_release() that I'm thinking of. I just fixed all strbuf_setlen(..., 0) -> strbuf_reset(...) throughout the patch series. The fix will be in the re-roll. Michael -- Michael Haggerty mhagger@xxxxxxxxxxxx http://softwareswirl.blogspot.com/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html