xfs: Changes to 'master'

Alan Coopersmith alanc at kemper.freedesktop.org
Tue Jun 16 22:56:36 PDT 2015


 difs/dispatch.c |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 4fdc960c33724f859be74a630e0d668a74f6637d
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Mon Jun 8 23:20:06 2015 -0700

    Fix memory leaks when not using alloca
    
    Reported by Oracle Parfait 1.5.1:
    
    Error: Memory leak (CWE 401)
       Memory leak of pointer client_auth allocated with FSalloc((prefix->num_auths * 24))
            at line 256 of difs/dispatch.c in function 'ProcEstablishConnection'.
              client_auth allocated at line 243 with FSalloc((prefix->num_auths * 24)).
              client_auth leaks when (((Atom)ad) - ((Atom)(prefix + 8))) > ((stuff->length << 2) - 4) at line 252.
            malloc called at line 372 of os/utils.c in function 'FSalloc'
            at line 276 of difs/dispatch.c in function 'ProcEstablishConnection'.
              client_auth allocated at line 243 with FSalloc((prefix->num_auths * 24)).
              client_auth leaks when (i + 1) >= ((fsConnClientPrefix*)client->requestBuffer)[1].num_auths at line 251.
            malloc called at line 372 of os/utils.c in function 'FSalloc'
    
    Error: Memory leak (CWE 401)
       Memory leak of pointer acp allocated with FSalloc((stuff->num_auths * 24))
            at line 604 of difs/dispatch.c in function 'ProcCreateAC'.
              acp allocated at line 590 with FSalloc((stuff->num_auths * 24)).
              acp leaks when ((((Atom)ad) - ((Atom)client->requestBuffer)) + 8) > ((stuff->length << 2) - 4) at line 599.
            malloc called at line 372 of os/utils.c in function 'FSalloc'
            at line 622 of difs/dispatch.c in function 'ProcCreateAC'.
              acp allocated at line 590 with FSalloc((stuff->num_auths * 24)).
              acp leaks when (i + 1) >= ((fsCreateACReq*)client->requestBuffer)->num_auths at line 597.
            malloc called at line 372 of os/utils.c in function 'FSalloc'
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>



More information about the xorg-commit mailing list