Skip to contentSkip to conversation

network: free psk on error

PATCH Applied James Prestwood 2 participants 2 messages Feb 8, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 network: free psk on error

---
 src/network.c | 2 ++
 1 file changed, 2 insertions(+)

v2:
* Free psk in all cases as its never used past this point

src/network.c +2 -0
index 7cae413f..5a8d93ee 100644
@@ -399,6 +399,8 @@ static int network_load_psk(struct network *network, bool need_passphrase)
 			return 0;
 		}
 
+		l_free(psk);
+
 		path = storage_get_network_file_path(security, ssid);
 		l_error("%s: invalid PreSharedKey format", path);
 		l_free(path);
Signature · 1 line
2.26.2
#1 lore raw

Hi James,

Quoted 7 lines · James Prestwood
---
  src/network.c | 2 ++
  1 file changed, 2 insertions(+)

v2:
* Free psk in all cases as its never used past this point

Applied, thanks.

Regards,
-Denis