From e0acc35a4f60d2641e71593713acfb32cafef751 Mon Sep 17 00:00:00 2001 From: Simon Kuhnle Date: Thu, 23 Sep 2010 22:44:49 +0200 Subject: [PATCH] return undef if initiating snmp session fails --- upsgraph.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/upsgraph.pl b/upsgraph.pl index 100c52b..9887d0c 100755 --- a/upsgraph.pl +++ b/upsgraph.pl @@ -58,6 +58,7 @@ sub fetch_snmp(@) { if (!$session) { print STDERR "session error: $error"; + return undef; } $session->translate(0); -- 2.39.5