cifs: add kfree() on error path
authorDan Carpenter <error27@gmail.com>
Wed, 27 Oct 2010 21:19:32 +0000 (23:19 +0200)
committerSteve French <sfrench@us.ibm.com>
Thu, 28 Oct 2010 00:55:45 +0000 (00:55 +0000)
We leak 256 bytes here on this error path.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/file.c

index d7c212a3838664198a8014822bbf6d09cb2a9cb2..398a15a99a1b61e67995a6768eab9f2a21ce079d 100644 (file)
@@ -1362,6 +1362,7 @@ static int cifs_writepages(struct address_space *mapping,
        if (!experimEnabled && tcon->ses->server->secMode &
                        (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {
                cifsFileInfo_put(open_file);
+               kfree(iov);
                return generic_writepages(mapping, wbc);
        }
        cifsFileInfo_put(open_file);