commit 3621e998c91921ab65579a56f902f65970fd2086
parent fe6f4153c5ee8d44c0d1228f43a759a2ad8fd74c
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date: Fri, 5 Mar 2021 16:09:28 +0100
ap: Add missing ap_config_free() in error path
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/ap.c b/src/ap.c
@@ -3119,8 +3119,10 @@ static struct l_dbus_message *ap_dbus_start_profile(struct l_dbus *dbus,
config->profile = storage_get_path("ap/%s.ap", ssid);
ap_if->ap = ap_start(ap_if->netdev, config, &ap_dbus_ops, &err, ap_if);
- if (!ap_if->ap)
+ if (!ap_if->ap) {
+ ap_config_free(config);
return dbus_error_from_errno(err, message);
+ }
ap_if->pending = l_dbus_message_ref(message);
return NULL;