Fix memory leaks and dereference without null check
[platform/upstream/connman.git] / vpn / vpn-provider.c
index 0e01ca2..8d2836e 100755 (executable)
@@ -2746,6 +2746,10 @@ void vpn_provider_set_data(struct vpn_provider *provider, void *data)
 
 void *vpn_provider_get_plugin_data(struct vpn_provider *provider)
 {
+#if defined TIZEN_EXT
+       if (!provider)
+               return NULL;
+#endif
        return provider->plugin_data;
 }