git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3 0/3] fix memory leaks in transport_push()

From
Josh Steadmon <steadmon@google.com>
Date
May 27, 2022, 20:22 UTC
Message-ID
<YpEzHfrD4e0S2Sjq@google.com>
In-Reply-To
<20220520124952.2393299-1-frantisek@hrbata.com>
On 2022.05.20 14:49, Frantisek Hrbata wrote:
Show 33 quoted lines
> Fix memory leaks in transport_push(), where remote_refs and local_refs
> are never freed. While at it, remove the unnecessary indenting and make
> the code hopefully more readable.
> 
> Changes since v2:
> 
>  * "transport: remove unnecessary indenting in transport_push()"
>    s/push_refs/transport_push/ in commit message as noticed
>    by Ævar Arnfjörð Bjarmason
> 
>  * "transport: unify return values and exit point from transport_push()"
>    Added as suggested by Ævar Arnfjörð Bjarmason. It allows the following
>    memory leak fix to be a very simple patch.
> 
>  * "transport: free local and remote refs in transport_push()"
>    Just free remote_refs and local_refs. The other changes were
>    included in the previous patch.
> 
> Changes since v1:
> 
>  * Slit into series of two patches. The first one just changes
>    indenting in transport_push(). Second one adds the fix for
>    the local_refs and remote_refs memory leaks.
> 
>  * The resulting trees are the same, there is no code change.
> 
> Frantisek Hrbata (3):
>   transport: remove unnecessary indenting in transport_push()
>   transport: unify return values and exit point from transport_push()
>   transport: free local and remote refs in transport_push()
> 
>  transport.c | 260 +++++++++++++++++++++++++++-------------------------
>  1 file changed, 133 insertions(+), 127 deletions(-)

Sorry for the late review. This all looks good to me, thanks for the fix!

Reviewed-by: Josh Steadmon <steadmon@google.com>
Previous: Frantisek Hrbata
Message 13 of 13 in “transport: free local and remote refs in transport_push()”
  1. transport: free local and remote refs in transport_push()Frantisek Hrbata, May 20, 2022
  2. Ævar Arnfjörð BjarmasonMay 20, 2022
  3. Frantisek HrbataMay 20, 2022
  4. 0/2 fix memory leaks in transport_push()Frantisek Hrbata, May 20, 2022
  5. 1/2 transport: remove unnecessary indenting in transport_push()Frantisek Hrbata, May 20, 2022
  6. Ævar Arnfjörð BjarmasonMay 20, 2022
  7. Frantisek HrbataMay 20, 2022
  8. 2/2 transport: free local and remote refs in transport_push()Frantisek Hrbata, May 20, 2022
  9. 0/3 fix memory leaks in transport_push()Frantisek Hrbata, May 20, 2022
  10. 1/3 transport: remove unnecessary indenting in transport_push()Frantisek Hrbata, May 20, 2022
  11. 3/3 transport: free local and remote refs in transport_push()Frantisek Hrbata, May 20, 2022
  12. 2/3 transport: unify return values and exit point from transport_push()Frantisek Hrbata, May 20, 2022
  13. Josh SteadmonMay 27, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.