Commit:     d5cd97872dca9b79c31224ca014bcea7ca01f5f1
Parent:     e02f5f52cafbea013817d81f1acc4baf50d6324b
Author:     Adrian Bunk <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 14 17:00:00 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Nov 14 18:45:41 2007 -0800

    sunrpc/xprtrdma/transport.c: fix use-after-free
    Fix an obvious use-after-free spotted by the Coverity checker.
    Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
    Cc: Trond Myklebust <[EMAIL PROTECTED]>
    Cc: "J. Bruce Fields" <[EMAIL PROTECTED]>
    Cc: Neil Brown <[EMAIL PROTECTED]>
    Cc: "David S. Miller" <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 net/sunrpc/xprtrdma/transport.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
index dc55cc9..1afeb3e 100644
--- a/net/sunrpc/xprtrdma/transport.c
+++ b/net/sunrpc/xprtrdma/transport.c
@@ -320,9 +320,9 @@ xprt_setup_rdma(struct xprt_create *args)
        xprt->slot = kcalloc(xprt->max_reqs,
                                sizeof(struct rpc_rqst), GFP_KERNEL);
        if (xprt->slot == NULL) {
-               kfree(xprt);
                dprintk("RPC:       %s: couldn't allocate %d slots\n",
                        __func__, xprt->max_reqs);
+               kfree(xprt);
                return ERR_PTR(-ENOMEM);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to