summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2018-05-12 17:09:42 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2018-05-12 17:09:42 +0200
commit5cb3bf654a762d797f94d9aca2d56484b3b0ed75 (patch)
treede861d0de63c8c86c6a722d72b53e32229c4ed6c /src
parent4b8c4f54bbd70849fc91679bea44b4e1dfb0526d (diff)
downloadfastd-5cb3bf654a762d797f94d9aca2d56484b3b0ed75.tar
fastd-5cb3bf654a762d797f94d9aca2d56484b3b0ed75.zip
status: fix segfault in tun/multitap mode with persist iface no
Diffstat (limited to 'src')
-rw-r--r--src/status.c2
1 files changed, 1 insertions, 1 deletions
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 */