nomoney: fix memory leak

This commit is contained in:
Juerd Waalboer 2024-11-17 02:59:19 +01:00
parent 7fc6503679
commit a9040dcca1

View file

@ -137,9 +137,10 @@ sub hook_abort($class, $cart, @) {
sub hook_checkout_done($class, $cart, $username, $transaction_id, @) {
my $n = $unresolved{$cart}->size or return;
print "\n";
_inform($unresolved{$cart}, $username);
delete $unresolved{$cart};
my $message = $n == 1 ? "THIS ENTRY WAS IGNORED" : "THESE ENTRIES WERE IGNORED";
say "\e[1;4m$message.\e[0m" if $n;