projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab1fd92
)
vpn: Fix null pointer dereference
author
Henrique Dante de Almeida
<hdante@profusion.mobi>
Tue, 8 May 2012 19:20:53 +0000
(16:20 -0300)
committer
Patrik Flykt
<patrik.flykt@linux.intel.com>
Wed, 9 May 2012 14:15:14 +0000
(17:15 +0300)
plugins/vpn.c
patch
|
blob
|
history
diff --git
a/plugins/vpn.c
b/plugins/vpn.c
index
ada15aa
..
e442306
100644
(file)
--- a/
plugins/vpn.c
+++ b/
plugins/vpn.c
@@
-351,9
+351,12
@@
static int vpn_connect(struct connman_provider *provider)
vpn_driver_data = g_hash_table_lookup(driver_hash, name);
- if (vpn_driver_data != NULL && vpn_driver_data->vpn_driver != NULL &&
- vpn_driver_data->vpn_driver->flags != VPN_FLAG_NO_TUN) {
+ if (vpn_driver_data == NULL || vpn_driver_data->vpn_driver == NULL) {
+ ret = -EINVAL;
+ goto exist_err;
+ }
+ if (vpn_driver_data->vpn_driver->flags != VPN_FLAG_NO_TUN) {
ret = vpn_create_tun(provider);
if (ret < 0)
goto exist_err;