From 4093bf7ff8c8861cf7b941945ede53a8ec5bb6c8 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 9 Sep 2003 04:07:32 +0000 Subject: sync 3.0 into HEAD for the last time (This used to be commit c17a7dc9a190156a069da3e861c18fd3f81224ad) --- source3/torture/cmd_vfs.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'source3/torture/cmd_vfs.c') diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c index d91dbf50e0..8317a57a20 100644 --- a/source3/torture/cmd_vfs.c +++ b/source3/torture/cmd_vfs.c @@ -490,8 +490,8 @@ static NTSTATUS cmd_stat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, c int ret; const char *user; const char *group; - struct passwd *pwd; - struct group *grp; + struct passwd *pwd = NULL; + struct group *grp = NULL; SMB_STRUCT_STAT st; if (argc != 2) { @@ -533,6 +533,7 @@ static NTSTATUS cmd_stat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, c printf(" Access: %s", ctime(&(st.st_atime))); printf(" Modify: %s", ctime(&(st.st_mtime))); printf(" Change: %s", ctime(&(st.st_ctime))); + SAFE_FREE(pwd); SAFE_FREE(grp); return NT_STATUS_OK; @@ -544,8 +545,8 @@ static NTSTATUS cmd_fstat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, int fd; const char *user; const char *group; - struct passwd *pwd; - struct group *grp; + struct passwd *pwd = NULL; + struct group *grp = NULL; SMB_STRUCT_STAT st; if (argc != 2) { @@ -596,6 +597,7 @@ static NTSTATUS cmd_fstat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, printf(" Access: %s", ctime(&(st.st_atime))); printf(" Modify: %s", ctime(&(st.st_mtime))); printf(" Change: %s", ctime(&(st.st_ctime))); + SAFE_FREE(pwd); SAFE_FREE(grp); return NT_STATUS_OK; @@ -606,8 +608,8 @@ static NTSTATUS cmd_lstat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, { const char *user; const char *group; - struct passwd *pwd; - struct group *grp; + struct passwd *pwd = NULL; + struct group *grp = NULL; SMB_STRUCT_STAT st; if (argc != 2) { @@ -647,6 +649,7 @@ static NTSTATUS cmd_lstat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, printf(" Access: %s", ctime(&(st.st_atime))); printf(" Modify: %s", ctime(&(st.st_mtime))); printf(" Change: %s", ctime(&(st.st_ctime))); + SAFE_FREE(pwd); SAFE_FREE(grp); return NT_STATUS_OK; -- cgit