From: Matthieu Moy Date: Wed, 03 Jun 2015 17:20:16 GMT Subject: Re: [RFC/PATCH 1/2] status: give more information during rebase -i Message-ID: In-Reply-To: <1433320545-14244-1-git-send-email-guillaume.pages@ensimag.grenoble-inp.fr> Guillaume Pagès writes: > + if (!fclose(fp)) > + strbuf_detach(&buf, NULL); > + else > + strbuf_release(&buf); Why these two cases? Aren't you leaking the buffer when calling strbuf_detach and ignoring its return value? (In general, there's not much to do when fclose fails actually) -- Matthieu Moy http://www-verimag.imag.fr/~moy/