staging: rtl8723au: fix potential leak in update_bcn_wps_ie()
authorChristian Engelmayer <cengelma@gmx.at>
Fri, 9 May 2014 13:03:50 +0000 (15:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 May 2014 20:11:59 +0000 (13:11 -0700)
commit086f7a4d1758998c3692bb8d4fbd3a05eb27a7a1
tree9e297b1d410c5f8b52558c1ebb565513244cfe7f
parent6e8bc71df6aeed8722256f5465b5857235c046a3
staging: rtl8723au: fix potential leak in update_bcn_wps_ie()

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@gmx.at>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_ap.c