diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/vpn.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/vpn.c b/plugins/vpn.c index b75df05d..e028b63a 100644 --- 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; } |