aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2006-12-02 19:41:33 (GMT)
committerJouni Malinen <j@w1.fi>2006-12-02 19:41:33 (GMT)
commitf6765a714a17c8dd6bf8f9fab0515c5c1f016c63 (patch)
treeb9f847aecb2b147df7c360801e4707873473f981
parent05dd961449b568eeed2866bb04d4f3eed04e4e13 (diff)
downloadhostap-history-f6765a714a17c8dd6bf8f9fab0515c5c1f016c63.zip
hostap-history-f6765a714a17c8dd6bf8f9fab0515c5c1f016c63.tar.gz
hostap-history-f6765a714a17c8dd6bf8f9fab0515c5c1f016c63.tar.bz2
Fixed a memory leak.
-rw-r--r--hostapd/driver_prism54.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hostapd/driver_prism54.c b/hostapd/driver_prism54.c
index e5458f7..3b474f5 100644
--- a/hostapd/driver_prism54.c
+++ b/hostapd/driver_prism54.c
@@ -234,6 +234,7 @@ static int prism54_set_encryption(const char *ifname, void *priv,
/* the only way to clear the key is to deauth it */
/* and prism54 is capable to receive unencrypted packet */
/* so we do nothing here */
+ free(hdr);
return 0;
} else {
printf("bad auth type: %s\n", alg);
@@ -250,8 +251,10 @@ static int prism54_set_encryption(const char *ifname, void *priv,
memcpy(buf, key, key_len);
ret = send(drv->pim_sock, hdr, blen, 0);
- if (ret < 0)
+ if (ret < 0) {
+ free(hdr);
return ret;
+ }
prism54_waitpim(priv, hdr->oid, hdr, blen, 10);
free(hdr);