git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ba5d1cd
)
don't leak memory if cli->tree is NULL
author
Herb Lewis
<herb@samba.org>
Fri, 15 Aug 2003 23:57:05 +0000
(23:57 +0000)
committer
Herb Lewis
<herb@samba.org>
Fri, 15 Aug 2003 23:57:05 +0000
(23:57 +0000)
source/libcli/cliconnect.c
patch
|
blob
|
history
diff --git
a/source/libcli/cliconnect.c
b/source/libcli/cliconnect.c
index ea5f4e8a5dce74f02be3f942389c24829a58cdc9..4fdffa628712e7327e7dabce31d4066d39aebd68 100644
(file)
--- a/
source/libcli/cliconnect.c
+++ b/
source/libcli/cliconnect.c
@@
-211,9
+211,11
@@
struct cli_state *cli_state_init(void)
****************************************************************************/
void cli_shutdown(struct cli_state *cli)
{
****************************************************************************/
void cli_shutdown(struct cli_state *cli)
{
- if (!cli || !cli->tree) return;
- cli->tree->reference_count++;
- cli_tree_close(cli->tree);
+ if (!cli) return;
+ if (cli->tree) {
+ cli->tree->reference_count++;
+ cli_tree_close(cli->tree);
+ }
if (cli->mem_ctx) {
talloc_destroy(cli->mem_ctx);
}
if (cli->mem_ctx) {
talloc_destroy(cli->mem_ctx);
}