summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-07-15 09:42:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:28:37 -0500
commitd537225c4c467e8bda6e8f45b69a64c16c5ecb58 (patch)
tree77b324e4c940a6bfcd6276bedb87b4a1ee16a951
parente84f8662e6af515aba5db7ffd874ad5da97188bf (diff)
downloadsamba-d537225c4c467e8bda6e8f45b69a64c16c5ecb58.tar.gz
samba-d537225c4c467e8bda6e8f45b69a64c16c5ecb58.tar.bz2
samba-d537225c4c467e8bda6e8f45b69a64c16c5ecb58.zip
r23879: Fix two memleaks, found by the IBM checker
(This used to be commit 4d1b33f51308c95293fa2494b47ba1255af8d216)
-rw-r--r--source3/smbd/filename.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 824c32867a..a1b56736a0 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -237,10 +237,12 @@ NTSTATUS unix_convert(connection_struct *conn,
if (p) {
if (p[2] == '/') {
/* Error code within a pathname. */
- return NT_STATUS_OBJECT_PATH_NOT_FOUND;
+ result = NT_STATUS_OBJECT_PATH_NOT_FOUND;
+ goto fail;
} else if (p[2] == '\0') {
/* Error code at the end of a pathname. */
- return NT_STATUS_OBJECT_NAME_INVALID;
+ result = NT_STATUS_OBJECT_NAME_INVALID;
+ goto fail;
}
}
stat_cache_add(orig_path, name, conn->case_sensitive);