From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 092821F66F for ; Sat, 22 Aug 2020 06:06:28 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/5] searchidxshard: clear $msgref buffer properly Date: Sat, 22 Aug 2020 06:06:23 +0000 Message-Id: <20200822060627.15595-2-e@yhbt.net> In-Reply-To: <20200822060627.15595-1-e@yhbt.net> References: <20200822060627.15595-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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(-) 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); }