Commit d9290327 authored by Martin Kaiser's avatar Martin Kaiser Committed by Greg Kroah-Hartman

staging: r8188eu: don't copy ra and ta before we fail

In validate_recv_data_frame, we return an error if both to_ds and
from_ds are set in the incoming data frame. There's no need to populate
patrib->ra and ta before we return. The caller will free the received
frame, including pattrib.
Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220403165438.357728-7-martin@kaiser.cxSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eafbade3
......@@ -974,11 +974,6 @@ static int validate_recv_data_frame(struct adapter *adapter,
memcpy(pattrib->ta, psa, ETH_ALEN);
ret = sta2ap_data_frame(adapter, precv_frame, &psta);
break;
case 3:
memcpy(pattrib->ra, GetAddr1Ptr(ptr), ETH_ALEN);
memcpy(pattrib->ta, GetAddr2Ptr(ptr), ETH_ALEN);
ret = _FAIL;
break;
default:
ret = _FAIL;
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment