From a279d43a0a9fce97936ebb9facd89662bfcd5a23 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 22 Aug 2020 06:06:23 +0000 Subject: searchidxshard: clear $msgref buffer properly Merely assigning `undef' to a scalar does not free the underlying buffer memory of a scalar. --- lib/PublicInbox/SearchIdxShard.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/SearchIdxShard.pm') diff --git a/lib/PublicInbox/SearchIdxShard.pm b/lib/PublicInbox/SearchIdxShard.pm index 20077e08..75521b43 100644 --- a/lib/PublicInbox/SearchIdxShard.pm +++ b/lib/PublicInbox/SearchIdxShard.pm @@ -97,7 +97,7 @@ sub index_raw { "\n", $$msgref or die "failed to write shard $!\n"; } else { if ($eml) { - $$msgref = undef; + undef $$msgref; } else { # --xapian-only + --sequential-shard: $eml = PublicInbox::Eml->new($msgref); } -- cgit v1.2.3-24-ge0c7