From 5cb3bf654a762d797f94d9aca2d56484b3b0ed75 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 12 May 2018 17:09:42 +0200 Subject: status: fix segfault in tun/multitap mode with persist iface no --- src/status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/status.c') diff --git a/src/status.c b/src/status.c index 75ae9ec..bc910e8 100644 --- a/src/status.c +++ b/src/status.c @@ -88,7 +88,7 @@ static json_object * dump_stat(const fastd_stats_t *stats, fastd_stat_type_t typ /** Dumps a single traffic stat as a JSON object */ static json_object * dump_iface(const fastd_iface_t *iface) { - return iface->name ? json_object_new_string(iface->name) : NULL; + return (iface && iface->name) ? json_object_new_string(iface->name) : NULL; } /** Dumps a fastd_stats_t as a JSON object */ -- cgit v1.2.3