dpp: unref DPP frame if sending fails
James Prestwood
PATCH 1/2 dpp: unref DPP frame if sending fails
--- src/dpp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
src/dpp.c +3 -1
@@ -219,8 +219,10 @@ static void dpp_send_frame(uint64_t wdev_id, struct iovec *iov, size_t iov_len,l_debug ("Sending frame on frequency %u" , freq); -if (!l_genl_family_send (nl80211, msg, dpp_send_frame_cb,NULL ,NULL )) +if (!l_genl_family_send (nl80211, msg, dpp_send_frame_cb,NULL ,NULL )) {l_error ("Could not send CMD_FRAME" ); +l_genl_msg_unref (msg); + } } static size_t dpp_build_header(const uint8_t *src, const uint8_t *dest,
Signature · 1 line
2.31.1
Denis Kenzior
Hi James,
Quoted 4 lines · James Prestwood
--- src/dpp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Both applied, thanks.
Regards,
-Denis
James Prestwood
PATCH 2/2 dpp: memset header to fix uninitialized buffer
In reply to James Prestwood--- src/dpp.c | 2 ++ 1 file changed, 2 insertions(+)
src/dpp.c +2 -0
@@ -656,6 +656,8 @@ static void dpp_send_config_response(struct dpp_sm *dpp, uint8_t status)size_t json_len;uint8_t *ptr = hdr +24 ; +memset (hdr,0 ,sizeof (hdr)); +l_put_le16 (0x00d0 , hdr);memcpy (hdr +4 , dpp->auth_addr,6 );memcpy (hdr +10 ,netdev_get_address (dpp->netdev),6 );
Signature · 1 line
2.31.1