jsoninfo: protect against nulll-deref in print_interface_config
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 9 Mar 2016 12:43:29 +0000 (13:43 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 9 Mar 2016 12:47:27 +0000 (13:47 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/jsoninfo/src/olsrd_jsoninfo.c

index 4bc7a1d..14051b4 100644 (file)
@@ -253,7 +253,7 @@ static void print_interface_config(struct autobuf *abuf, const char * name, stru
   assert(name);
 
   abuf_json_mark_object(true, false, abuf, name);
-  {
+  if (id) {
     struct olsr_lq_mult *mult;
 
     abuf_json_ip_address(abuf, "ipv4Broadcast", &id->ipv4_multicast);