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:
3300c18
)
vpn: Fix fd leak
author
Daniel Wagner
<daniel.wagner@bmw-carit.de>
Thu, 17 Mar 2011 13:25:38 +0000
(14:25 +0100)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Thu, 17 Mar 2011 16:48:15 +0000
(17:48 +0100)
Reported by: DJ Cozatt <ygdrasil@comcast.net>
plugins/vpn.c
patch
|
blob
|
history
diff --git
a/plugins/vpn.c
b/plugins/vpn.c
index
b75df05
..
e028b63
100644
(file)
--- a/
plugins/vpn.c
+++ b/
plugins/vpn.c
@@
-250,7
+250,9
@@
static int vpn_connect(struct connman_provider *provider)
}
data->if_name = (char *)g_strdup(ifr.ifr_name);
- if (!data->if_name) {
+ if (data->if_name == NULL) {
+ connman_error("Failed to allocate memory");
+ close(fd);
ret = -ENOMEM;
goto exist_err;
}