git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: gitster@pobox.com, peff@peff.net
Cc: git@vger.kernel.org, Stefan Beller <sbeller@google.com>
Subject: [PATCH v2 3/4] object.c: free replace map in raw_object_store_clear
Date: Thu, 10 May 2018 12:58:48 -0700	[thread overview]
Message-ID: <20180510195849.28023-4-sbeller@google.com> (raw)
In-Reply-To: <20180510195849.28023-1-sbeller@google.com>

The replace map for objects was missed to free in the object store in
the conversion of c1274495 ("replace-object: eliminate replace objects
prepared flag", 2018-04-11). We also missed to free the replaced objects
that are put into the replace map in that whole series.

Signed-off-by: Stefan Beller <sbeller@google.com>
---
 object.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/object.c b/object.c
index 242d922d953..80d1cae53c0 100644
--- a/object.c
+++ b/object.c
@@ -481,6 +481,9 @@ void raw_object_store_clear(struct raw_object_store *o)
 	FREE_AND_NULL(o->objectdir);
 	FREE_AND_NULL(o->alternate_db);
 
+	oidmap_free(o->replace_map, 1);
+	FREE_AND_NULL(o->replace_map);
+
 	free_alt_odbs(o);
 	o->alt_odb_tail = NULL;
 
-- 
2.17.0.255.g8bfb7c0704


  parent reply	other threads:[~2018-05-10 19:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10 19:58 [PATCH v2 0/4] Fix mem leaks of recent object store conversions Stefan Beller
2018-05-10 19:58 ` [PATCH v2 1/4] packfile: close and free packs upon releasing an object store Stefan Beller
2018-05-10 19:58 ` [PATCH v2 2/4] packfile.h: remove all extern keywords Stefan Beller
2018-05-10 19:58 ` Stefan Beller [this message]
2018-05-10 19:58 ` [PATCH v2 4/4] replace-object.c: remove the_repository from prepare_replace_object Stefan Beller
2018-05-11  8:37 ` [PATCH v2 0/4] Fix mem leaks of recent object store conversions Jeff King
2018-05-11 18:59   ` Stefan Beller

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20180510195849.28023-4-sbeller@google.com \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).