Skip to content

Commit c373ec3

Browse files
Mark Raymondoalders
authored andcommitted
Cookies.pm: die if close on $fh in ->save fails
1 parent c25de27 commit c373ec3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/HTTP/Cookies.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ sub save
434434
open(my $fh, '>', $file) or die "Can't open $file: $!";
435435
print {$fh} "#LWP-Cookies-1.0\n";
436436
print {$fh} $self->as_string(!$self->{ignore_discard});
437+
close $fh or die "Can't close $file: $!";
437438
1;
438439
}
439440

0 commit comments

Comments
 (0)