Explorar el Código

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 hace 14 años
padre
commit
6b03590412
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  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);