summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2007-06-10 04:37:22 +0000
committermjacob <mjacob@FreeBSD.org>2007-06-10 04:37:22 +0000
commit96d1e042bf1f5e804011804f2b1b4e5b2e9623f4 (patch)
treeed335faa346dd447aa2c19baa85cf6fe9b725a99 /sys/compat
parent16bebbfda68e1121a5e7ff0b9c664afe1711751a (diff)
downloadFreeBSD-src-96d1e042bf1f5e804011804f2b1b4e5b2e9623f4.zip
FreeBSD-src-96d1e042bf1f5e804011804f2b1b4e5b2e9623f4.tar.gz
Ensure that newpath is always initialized, even for the error case.
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 042a5b2..1989e19 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -239,6 +239,8 @@ linux_at(struct thread *td, int dirfd, char *filename, char **newpath, char **fr
*newpath = malloc(strlen(fullpath) + strlen(filename) + 2, M_TEMP, M_WAITOK | M_ZERO);
*freebuf = freepath;
sprintf(*newpath, "%s/%s", fullpath, filename);
+ } else {
+ *newpath = NULL;
}
vfslocked = VFS_LOCK_GIANT(dvp->v_mount);
vrele(dvp);
OpenPOWER on IntegriCloud