summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/torture/locktest.c3
-rw-r--r--source3/torture/locktest2.c3
-rw-r--r--source3/torture/scanner.c8
3 files changed, 6 insertions, 8 deletions
diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c
index b107afc895..b70b445c08 100644
--- a/source3/torture/locktest.c
+++ b/source3/torture/locktest.c
@@ -250,8 +250,7 @@ static void reconnect(struct cli_state *cli[NSERVERS][NCONNECTIONS], int fnum[NS
}
cli_ulogoff(cli[server][conn]);
cli_shutdown(cli[server][conn]);
- free(cli[server][conn]);
- cli[server][conn] = NULL;
+ SAFE_FREE(cli[server][conn]);
}
cli[server][conn] = connect_one(share[server]);
if (!cli[server][conn]) {
diff --git a/source3/torture/locktest2.c b/source3/torture/locktest2.c
index 2b74b77b64..734c9c44bf 100644
--- a/source3/torture/locktest2.c
+++ b/source3/torture/locktest2.c
@@ -267,8 +267,7 @@ static void reconnect(struct cli_state *cli[NSERVERS][NCONNECTIONS],
}
cli_ulogoff(cli[server][conn]);
cli_shutdown(cli[server][conn]);
- free(cli[server][conn]);
- cli[server][conn] = NULL;
+ SAFE_FREE(cli[server][conn]);
}
cli[server][conn] = connect_one(share[server]);
if (!cli[server][conn]) {
diff --git a/source3/torture/scanner.c b/source3/torture/scanner.c
index c5f6708408..a6025593ff 100644
--- a/source3/torture/scanner.c
+++ b/source3/torture/scanner.c
@@ -71,8 +71,8 @@ static NTSTATUS try_trans2(struct cli_state *cli,
&rparam, rparam_len,
&rdata, rdata_len);
- if (rdata) free(rdata);
- if (rparam) free(rparam);
+ SAFE_FREE(rdata);
+ SAFE_FREE(rparam);
return cli_nt_error(cli);
}
@@ -273,8 +273,8 @@ static NTSTATUS try_nttrans(struct cli_state *cli,
&rparam, rparam_len,
&rdata, rdata_len);
- if (rdata) free(rdata);
- if (rparam) free(rparam);
+ SAFE_FREE(rdata);
+ SAFE_FREE(rparam);
return cli_nt_error(cli);
}