session: Fix NULL pointer name append
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Fri, 29 Apr 2011 12:34:27 +0000 (14:34 +0200)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Mon, 2 May 2011 16:17:30 +0000 (18:17 +0200)
A network name can be NULL, for example for a wifi network.

src/session.c

index caace08a2c5c01c73a7acddaea1a75361076945f..6b5192b29e2fd7c8a2c741a789437fdf59162a29 100644 (file)
@@ -717,6 +717,8 @@ static void update_info(struct session_info *info)
 
                info->online = __connman_service_is_connected(info->service);
                info->name = __connman_service_get_name(info->service);
+               if (info->name == NULL)
+                       info->name = "";
 
                idx = __connman_service_get_index(info->service);
                info->ifname = connman_inet_ifname(idx);