From 2d6a3079b805a57f5618c97fff2adda77de934f4 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 17 Sep 2001 11:37:57 +0000 Subject: move to SAFE_FREE() (This used to be commit fc71962409e11509a60fb2be6741c32970865881) --- source3/torture/locktest.c | 3 +-- source3/torture/locktest2.c | 3 +-- source3/torture/scanner.c | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) (limited to 'source3') 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); } -- cgit