diff options
-rwxr-xr-x | plugins/bluetooth.c | 4 | ||||
-rwxr-xr-x | src/iptables.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c index e1d4b599..24f3aa52 100755 --- a/plugins/bluetooth.c +++ b/plugins/bluetooth.c @@ -723,7 +723,7 @@ static bool tethering_create(const char *path, struct connman_technology *technology, const char *bridge, bool enabled) { - struct tethering_info *tethering = g_new0(struct tethering_info, 1); + struct tethering_info *tethering; GDBusProxy *proxy; const char *method; bool result; @@ -737,6 +737,8 @@ static bool tethering_create(const char *path, if (!proxy) return false; + tethering = g_new0(struct tethering_info, 1); + tethering->technology = technology; tethering->bridge = g_strdup(bridge); tethering->enable = enabled; diff --git a/src/iptables.c b/src/iptables.c index 8d583eae..dd1b2e63 100755 --- a/src/iptables.c +++ b/src/iptables.c @@ -2364,8 +2364,10 @@ int __connman_iptables_iterate_chains(const char *table_name, struct connman_iptables *table; table = get_table(table_name); - if (!table) + if (!table) { + g_free(cbd); return -EINVAL; + } iterate_entries(table->blob_entries->entrytable, table->info->valid_hooks, |