summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2020-07-13 10:08:47 -0700
committerAndreas Schneider <asn@cryptomilk.org>2020-07-14 07:42:54 +0000
commitaa4d135710e0fdcf92f522b3c6228717105c0775 (patch)
treec303e68c73eb34df920bc631ca73ad60fff548d2
parent965d18880081296ed7189daa0eeef6024c308db1 (diff)
downloadsamba-aa4d135710e0fdcf92f522b3c6228717105c0775.tar.gz
s3: lib: Fix missing TALLOC_FREE in error code path.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14441 Reported by Alexander Pyhalov <apyhalov@gmail.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Jul 14 07:42:54 UTC 2020 on sn-devel-184
-rw-r--r--lib/util/util_paths.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util/util_paths.c b/lib/util/util_paths.c
index 72cc0aab8de..8ac85460fba 100644
--- a/lib/util/util_paths.c
+++ b/lib/util/util_paths.c
@@ -106,7 +106,7 @@ static char *get_user_home_dir(TALLOC_CTX *mem_ctx)
}
len = strnlen(szPath, PATH_MAX);
if (len >= PATH_MAX) {
- return NULL;
+ goto done;
}
out = talloc_strdup(mem_ctx, szPath);
goto done;