diff options
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rap/rap.c | 2 | ||||
-rw-r--r-- | source4/torture/raw/open.c | 12 | ||||
-rw-r--r-- | source4/torture/raw/search.c | 3 | ||||
-rw-r--r-- | source4/torture/rpc/winreg.c | 3 |
4 files changed, 10 insertions, 10 deletions
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c index 0a5ef6d34e..7dc9e7fcbc 100644 --- a/source4/torture/rap/rap.c +++ b/source4/torture/rap/rap.c @@ -79,7 +79,7 @@ static void rap_cli_push_paramdesc(struct rap_call *call, char desc) if (call->paramdesc != NULL) len = strlen(call->paramdesc); - call->paramdesc = talloc_realloc(call->mem_ctx, call->paramdesc, + call->paramdesc = talloc_realloc(call->paramdesc, len+2); call->paramdesc[len] = desc; call->paramdesc[len+1] = '\0'; diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c index 8cdc18fe2f..2cb39b3231 100644 --- a/source4/torture/raw/open.c +++ b/source4/torture/raw/open.c @@ -150,7 +150,7 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) union smb_fileinfo finfo; const char *fname = BASEDIR "\\torture_open.txt"; NTSTATUS status; - int fnum, fnum2; + int fnum = -1, fnum2; BOOL ret = True; printf("Checking RAW_OPEN_OPEN\n"); @@ -261,7 +261,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) union smb_fileinfo finfo; const char *fname = BASEDIR "\\torture_openx.txt"; NTSTATUS status; - int fnum, fnum2; + int fnum = -1, fnum2; BOOL ret = True; int i; struct { @@ -579,7 +579,7 @@ static BOOL test_ntcreatex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) const char *fname = BASEDIR "\\torture_ntcreatex.txt"; const char *dname = BASEDIR "\\torture_ntcreatex.dir"; NTSTATUS status; - int fnum; + int fnum = -1; BOOL ret = True; int i; struct { @@ -822,7 +822,7 @@ static BOOL test_mknew(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) union smb_open io; const char *fname = BASEDIR "\\torture_mknew.txt"; NTSTATUS status; - int fnum; + int fnum = -1; BOOL ret = True; time_t basetime = (time(NULL) + 3600*24*3) & ~1; union smb_fileinfo finfo; @@ -876,7 +876,7 @@ static BOOL test_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) union smb_open io; const char *fname = BASEDIR "\\torture_create.txt"; NTSTATUS status; - int fnum; + int fnum = -1; BOOL ret = True; time_t basetime = (time(NULL) + 3600*24*3) & ~1; union smb_fileinfo finfo; @@ -930,7 +930,7 @@ static BOOL test_ctemp(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) { union smb_open io; NTSTATUS status; - int fnum; + int fnum = -1; BOOL ret = True; time_t basetime = (time(NULL) + 3600*24*3) & ~1; union smb_fileinfo finfo; diff --git a/source4/torture/raw/search.c b/source4/torture/raw/search.c index f1d51a8c69..19dfcc51d4 100644 --- a/source4/torture/raw/search.c +++ b/source4/torture/raw/search.c @@ -377,8 +377,7 @@ static BOOL multiple_search_callback(void *private, union smb_search_data *file) data->count++; - data->list = talloc_realloc(data->mem_ctx, - data->list, + data->list = talloc_realloc(data->list, data->count * (sizeof(data->list[0]))); data->list[data->count-1] = *file; diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c index 86b91eacc2..59f0fc4a04 100644 --- a/source4/torture/rpc/winreg.c +++ b/source4/torture/rpc/winreg.c @@ -488,8 +488,9 @@ static BOOL test_Open(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, void *fn) BOOL ret = True; winreg_open_fn *open_fn = (winreg_open_fn *)fn; - if (!open_fn(p, mem_ctx, &handle)) + if (!open_fn(p, mem_ctx, &handle)) { return False; + } if (!test_CreateKey(p, mem_ctx, &handle, "spottyfoot", NULL)) { printf("CreateKey failed\n"); |