From 2ba956ed135012e994d180b8ced6ba30bf778d98 Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Sun, 10 Jun 2007 04:37:22 +0000 Subject: [PATCH] Ensure that newpath is always initialized, even for the error case. --- sys/compat/linux/linux_file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 042a5b2e4f3e..1989e194bab8 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);