From: Eric Wong Date: Sat, 22 Aug 2020 06:06:23 +0000 (+0000) Subject: searchidxshard: clear $msgref buffer properly X-Git-Tag: v1.6.0~109 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=a279d43a0a9fce97936ebb9facd89662bfcd5a23;hp=99404a3bc0ab01b4f10ea698d88642b2ebc932e1 searchidxshard: clear $msgref buffer properly Merely assigning `undef' to a scalar does not free the underlying buffer memory of a scalar. --- 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); }