From: Adrian Bunk Date: Mon, 21 Nov 2005 22:32:14 +0000 (-0500) Subject: drivers/ieee1394/raw1394.c: fix a NULL pointer X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d734f92b0dc4c04daa2e0106354972cbbc2e0fbe;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git drivers/ieee1394/raw1394.c: fix a NULL pointer 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 Signed-off-by: Jody McIntyre --- diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c index 0278dc5d5ef9..99b2ce15db83 100644 --- a/drivers/ieee1394/raw1394.c +++ b/drivers/ieee1394/raw1394.c @@ -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;