From 509b2c5ca5423318a57990f4d0341782454d19af Mon Sep 17 00:00:00 2001 From: Avinash Sonawane Date: Tue, 23 Mar 2021 13:10:20 +0530 Subject: [PATCH] Check if ip_address string is non-empty --- panel-plugin/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel-plugin/net.c b/panel-plugin/net.c index 5ed8694..e4b66c3 100644 --- a/panel-plugin/net.c +++ b/panel-plugin/net.c @@ -217,7 +217,7 @@ char* get_ip_address(netdata* data) struct sockaddr_in *p_sa; /* use cached value if possible and if the update count is non-zero */ - if (data->ip_address && data->ip_update_count > 0) + if (data->ip_address[0] && data->ip_update_count > 0) { data->ip_update_count--; return data->ip_address;