Add extra NULL pointer check for service configuration
authorMarcel Holtmann <marcel@holtmann.org>
Fri, 25 Dec 2009 10:54:53 +0000 (02:54 -0800)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 25 Dec 2009 10:54:53 +0000 (02:54 -0800)
src/config.c

index af97831..d6b275d 100644 (file)
@@ -151,6 +151,9 @@ static int load_service(GKeyFile *keyfile, struct connman_config *config)
 
 static void free_service(struct connman_config_service *service)
 {
+       if (service == NULL)
+               return;
+
        g_free(service->type);
        g_free(service->ssid);
        g_free(service->eap);