From 0ae3e1c59d2ac9bad46eab332920108e4d2de255 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Mon, 8 Feb 2021 12:19:57 -0800 Subject: [PATCH] ap: free passphrase on error --- src/ap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ap.c b/src/ap.c index 8ea26a0d..162b456b 100644 --- a/src/ap.c +++ b/src/ap.c @@ -2568,6 +2568,7 @@ static int ap_load_profile_and_dhcp(struct ap_state *ap, bool *wait_dhcp) if (strlen(passphrase) > 63) { l_error("[Security].Passphrase must not exceed " "63 characters"); + l_free(passphrase); return -EINVAL; }