ubifs: free the encrypted symlink target
commit79fca845f0e420a8dbd1c9712d652a054f8dd5a3
authorEric Biggers <ebiggers@google.com>
Fri, 12 Jan 2018 04:27:00 +0000 (11 23:27 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 19:06:45 +0000 (16 20:06 +0100)
tree17c19fe8d153317363981b4bbbec35e7c2039b34
parent973f83fab1b1034643abadafab4d83683349a717
ubifs: free the encrypted symlink target

commit 6b46d444146eb8d0b99562795cea8086639d7282 upstream.

ubifs_symlink() forgot to free the kmalloc()'ed buffer holding the
encrypted symlink target, creating a memory leak.  Fix it.

(UBIFS could actually encrypt directly into ui->data, removing the
temporary buffer, but that is left for the patch that switches to use
the symlink helper functions.)

Fixes: ca7f85be8d6c ("ubifs: Add support for encrypted symlinks")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ubifs/dir.c