Ver Fonte

cifs: add kfree() on error path

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>
Dan Carpenter há 14 anos atrás
pai
commit
6b03590412
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      fs/cifs/file.c

+ 1 - 0
fs/cifs/file.c

@@ -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);