diff options
author | Volker Lendecke <vl@sernet.de> | 2007-12-01 14:38:19 +0100 |
---|---|---|
committer | Volker Lendecke <vl@sernet.de> | 2007-12-05 13:45:11 +0100 |
commit | 4b1f0d1d93d1e7bd0b4fa641d4e9629af8234d71 (patch) | |
tree | e1d00108563b503c0a52ab28069bdfb3679851c8 /source | |
parent | 4a2d502903934f4c3dc6b31595fe77a2013dbc21 (diff) | |
download | samba-4b1f0d1d93d1e7bd0b4fa641d4e9629af8234d71.tar.gz samba-4b1f0d1d93d1e7bd0b4fa641d4e9629af8234d71.tar.xz samba-4b1f0d1d93d1e7bd0b4fa641d4e9629af8234d71.zip |
TALLOC_FREE early
Diffstat (limited to 'source')
-rw-r--r-- | source/smbd/nttrans.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index 4d5e107ca64..12709f9e021 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -593,6 +593,7 @@ void reply_ntcreate_and_X(connection_struct *conn, * This filename is relative to a directory fid. */ char *parent_fname = NULL; + char *tmp; files_struct *dir_fsp = file_fsp(root_dir_fid); if(!dir_fsp) { @@ -668,12 +669,14 @@ void reply_ntcreate_and_X(connection_struct *conn, } } - fname = talloc_asprintf(ctx, "%s%s", parent_fname, fname); - if (fname == NULL) { + tmp = talloc_asprintf(ctx, "%s%s", parent_fname, fname); + if (tmp == NULL) { reply_nterror(req, NT_STATUS_NO_MEMORY); END_PROFILE(SMBntcreateX); return; } + TALLOC_FREE(fname); + fname = tmp; } else { /* * Check to see if this is a mac fork of some kind. @@ -1363,6 +1366,7 @@ static void call_nt_transact_create(connection_struct *conn, * This filename is relative to a directory fid. */ char *parent_fname = NULL; + char *tmp; files_struct *dir_fsp = file_fsp(root_dir_fid); if(!dir_fsp) { @@ -1433,12 +1437,14 @@ static void call_nt_transact_create(connection_struct *conn, } } - fname = talloc_asprintf(ctx, "%s%s", parent_fname, fname); - if (fname == NULL) { + tmp = talloc_asprintf(ctx, "%s%s", parent_fname, fname); + if (tmp == NULL) { reply_nterror(req, NT_STATUS_NO_MEMORY); END_PROFILE(SMBntcreateX); return; } + TALLOC_FREE(fname); + fname = tmp; } else { /* * Check to see if this is a mac fork of some kind. |