summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/msdfs.c2
-rw-r--r--source3/smbd/nttrans.c4
-rw-r--r--source3/smbd/trans2.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index 56089fbe95..69612dc571 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -1549,7 +1549,7 @@ struct junction_map *enum_msdfs_links(TALLOC_CTX *ctx, size_t *p_num_jn)
{
struct junction_map *jn = NULL;
int i=0;
- size_t jn_count;
+ size_t jn_count = 0;
int sharecount = 0;
*p_num_jn = 0;
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 14a11c3fe3..dce0d6188d 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -634,7 +634,7 @@ void reply_ntcreate_and_X(connection_struct *conn,
*/
dir_name_len = strlen(dir_fsp->fsp_name);
- fname = TALLOC_SIZE(ctx, dir_name_len+2);
+ fname = TALLOC_ARRAY(ctx, char, dir_name_len+2);
if (!fname) {
reply_nterror(
req, NT_STATUS_NO_MEMORY);
@@ -1392,7 +1392,7 @@ static void call_nt_transact_create(connection_struct *conn,
*/
dir_name_len = strlen(dir_fsp->fsp_name);
- fname = TALLOC_SIZE(ctx, dir_name_len+2);
+ fname = TALLOC_ARRAY(ctx, char, dir_name_len+2);
if (!fname) {
reply_nterror(
req, NT_STATUS_NO_MEMORY);
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 478f60d094..ada4868bf8 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -4209,7 +4209,7 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
case SMB_QUERY_FILE_UNIX_LINK:
{
- char *buffer = TALLOC_SIZE(ctx, 1024);
+ char *buffer = TALLOC_ARRAY(ctx, char, 1024);
if (!buffer) {
reply_nterror(req, NT_STATUS_NO_MEMORY);