]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drivers/ieee1394/raw1394.c: fix a NULL pointer
authorAdrian Bunk <bunk@stusta.de>
Mon, 21 Nov 2005 22:32:14 +0000 (17:32 -0500)
committerJody McIntyre <scjody@modernduck.com>
Mon, 21 Nov 2005 22:32:14 +0000 (17:32 -0500)
The coverity checker spotted that this was a NULL pointer dereference in
the "if (copy_from_user(...))" case since the next step is to
kfree(cache->filled_head).

There's no need to free cache at this point, and it's getting free'd
later.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
drivers/ieee1394/raw1394.c

index 0278dc5d5ef99cee0aa9c0de95aea387afaadf1e..99b2ce15db83558fb2720c768aa9c404d01ac907 100644 (file)
@@ -2131,7 +2131,6 @@ static int modify_config_rom(struct file_info *fi, struct pending_request *req)
                           req->req.length)) {
                csr1212_release_keyval(fi->csr1212_dirs[dr]);
                fi->csr1212_dirs[dr] = NULL;
-               CSR1212_FREE(cache);
                ret = -EFAULT;
        } else {
                cache->len = req->req.length;