The use of $info->{FirstTip}{flight} autovivifies $info->{FirstTip}.
Defend $pinfo against the use of an autovivified empty hashref.

Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com>
---
 sg-report-flight |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sg-report-flight b/sg-report-flight
index 7d2bc66..5b8f67a 100755
--- a/sg-report-flight
+++ b/sg-report-flight
@@ -586,7 +586,7 @@ sub print_pushgate_summary () {
        my $f = $info->{$flightkey};
        my $count = $info->{$countkey};
        bodyprintf "%-20s", $what;
-       if ($f) {
+       if ($f && %$f) {
            bodyprintf(" %6d  %s %4d days",
                   $f->{flight},
                   show_abs_time($f->{started}),
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to