git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sven Strickroth via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Patrick Steinhardt <ps@pks.im>,
	Sven Strickroth <email@cs-ware.de>,
	Sven Strickroth <email@cs-ware.de>
Subject: [PATCH v2] refs/files: prevent memory leak by freeing packed_ref_store
Date: Mon, 05 Aug 2024 09:53:32 +0000	[thread overview]
Message-ID: <pull.1757.v2.git.git.1722851612505.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1757.git.git.1722681471550.gitgitgadget@gmail.com>

From: Sven Strickroth <email@cs-ware.de>

This complements 64a6dd8ffc (refs: implement removal of ref storages,
2024-06-06).

Signed-off-by: Sven Strickroth <email@cs-ware.de>
---
    refs/files: prevent memory leak by freeing packed_ref_store
    
    This complements "refs: implement removal of ref storages"
    (64a6dd8ffc2f).

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1757%2Fcsware%2Frefs-files-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1757/csware/refs-files-v2
Pull-Request: https://github.com/git/git/pull/1757

Range-diff vs v1:

 1:  c68d0de3d58 ! 1:  96018e7257c refs/files: prevent memory leak by freeing packed_ref_store
     @@ Metadata
       ## Commit message ##
          refs/files: prevent memory leak by freeing packed_ref_store
      
     -    This complements "refs: implement removal of ref storages" (64a6dd8ffc2f).
     +    This complements 64a6dd8ffc (refs: implement removal of ref storages,
     +    2024-06-06).
      
          Signed-off-by: Sven Strickroth <email@cs-ware.de>
      


 refs/files-backend.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/refs/files-backend.c b/refs/files-backend.c
index aa52d9be7c7..11551de8f84 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -157,6 +157,7 @@ static void files_ref_store_release(struct ref_store *ref_store)
 	free_ref_cache(refs->loose);
 	free(refs->gitcommondir);
 	ref_store_release(refs->packed_ref_store);
+	free(refs->packed_ref_store);
 }
 
 static void files_reflog_path(struct files_ref_store *refs,

base-commit: e559c4bf1a306cf5814418d318cc0fea070da3c7
-- 
gitgitgadget

  parent reply	other threads:[~2024-08-05  9:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-03 10:37 [PATCH] refs/files: prevent memory leak by freeing packed_ref_store Sven Strickroth via GitGitGadget
2024-08-05  8:36 ` Patrick Steinhardt
2024-08-05  9:45   ` Sven Strickroth
2024-08-05  9:53 ` Sven Strickroth via GitGitGadget [this message]
2024-08-05 11:17   ` [PATCH v2] " Patrick Steinhardt
2024-08-05 15:58     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.1757.v2.git.git.1722851612505.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=email@cs-ware.de \
    --cc=git@vger.kernel.org \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).