ath: fix possible memory disclosure in ioctl handler
Submitted by: Domagoj Stolfa <domagoj.stolfa@gmail.com> MFC after: 1 week
This commit is contained in:
parent
ecc16fc696
commit
fab115e4cc
@ -197,7 +197,7 @@ ath_ioctl_diag(struct ath_softc *sc, struct ath_diag *ad)
|
|||||||
* pointer for us to use below in reclaiming the buffer;
|
* pointer for us to use below in reclaiming the buffer;
|
||||||
* may want to be more defensive.
|
* may want to be more defensive.
|
||||||
*/
|
*/
|
||||||
outdata = malloc(outsize, M_TEMP, M_NOWAIT);
|
outdata = malloc(outsize, M_TEMP, M_NOWAIT | M_ZERO);
|
||||||
if (outdata == NULL) {
|
if (outdata == NULL) {
|
||||||
error = ENOMEM;
|
error = ENOMEM;
|
||||||
goto bad;
|
goto bad;
|
||||||
|
Loading…
Reference in New Issue
Block a user