lkml.org 
[lkml]   [2012]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] net/wireless/wext-core.c: add missing kfree
    Date
    From: Julia Lawall <Julia.Lawall@lip6.fr>

    Free extra as done in the error-handling code just above.

    Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

    ---
    net/wireless/wext-core.c | 6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)

    diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c
    index 9f544c9..22adfeb 100644
    --- a/net/wireless/wext-core.c
    +++ b/net/wireless/wext-core.c
    @@ -781,8 +781,10 @@ static int ioctl_standard_iw_point(struct iw_point *iwp, unsigned int cmd,
    if (cmd == SIOCSIWENCODEEXT) {
    struct iw_encode_ext *ee = (void *) extra;

    - if (iwp->length < sizeof(*ee) + ee->key_len)
    - return -EFAULT;
    + if (iwp->length < sizeof(*ee) + ee->key_len) {
    + err = -EFAULT;
    + goto out;
    + }
    }
    }



    \
     
     \ /
      Last update: 2012-04-09 11:03    [W:0.021 / U:0.092 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site