Re: [PATCH v2] staging: rtl8723au: fix potential leak in update_bcn_wps_ie()

From: Jes Sorensen
Date: Fri May 02 2014 - 02:59:59 EST


Christian Engelmayer <cengelma@xxxxxx> writes:
> Fix a potential leak in the error path of function update_bcn_wps_ie().
> Move the affected input verification to the beginning of the function so
> that it may return directly without leaking already allocated memory.
> Detected by Coverity - CID 1077718.
>
> Signed-off-by: Christian Engelmayer <cengelma@xxxxxx>
> ---
> v2: Added change suggested by Mateusz Guzik:
>
> Move the check before allocating the memory instead of freeing the
> resource afterwards in the error path.
>
> Compile tested and applies against branch staging-next of tree
> git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
> ---
> drivers/staging/rtl8723au/core/rtw_ap.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)

Added to the 8723au tree

Thanks!

Jes
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/