From 92841b4976f92b0bcd6d6310803203e110a84c4c Mon Sep 17 00:00:00 2001 From: Andrzej Zaborowski Date: Fri, 17 Apr 2015 17:17:50 +0200 Subject: [PATCH] hwsim: Don't try l_genl_attr_next if _attr_init fails. This was causing a segfault. --- tools/hwsim.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/hwsim.c b/tools/hwsim.c index 7ff1cdb3..512f7ffd 100644 --- a/tools/hwsim.c +++ b/tools/hwsim.c @@ -125,6 +125,7 @@ static void destroy_callback(struct l_genl_msg *msg, void *user_data) } l_info("Destroyed radio"); + goto done; } while (l_genl_attr_next(&attr, &type, &len, &data)) {