Skip to content

Commit

Permalink
make sure stdout contains data before manipulating corresponding array
Browse files Browse the repository at this point in the history
  • Loading branch information
mrash committed Feb 22, 2015
1 parent 4437584 commit 66215e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/IPTables/Parse.pm
Expand Up @@ -816,7 +816,7 @@ sub exec_iptables() {
$rv = 0 if @stderr;
}

if ($stdout[$#stdout] =~ /^success/) {
if (@stdout and $stdout[$#stdout] =~ /^success/) {
pop @stdout;
}

Expand Down

0 comments on commit 66215e0

Please sign in to comment.