diff options
author | Volker Lendecke <vl@samba.org> | 2011-06-19 19:23:47 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-06-19 19:36:27 +0200 |
commit | 9cc68e49ee0744ecd64f12fc0f0c54e89bc6773c (patch) | |
tree | 7b4e8f81e3d3cefa9bd89047b20a49803467afbe | |
parent | 59887edd1d8ea1baefa3c884a80eafdb9691f095 (diff) | |
download | samba-9cc68e49ee0744ecd64f12fc0f0c54e89bc6773c.tar.gz samba-9cc68e49ee0744ecd64f12fc0f0c54e89bc6773c.tar.bz2 samba-9cc68e49ee0744ecd64f12fc0f0c54e89bc6773c.zip |
s3: Fix Coverity ID 2583: RESOURCE_LEAK
-rw-r--r-- | source3/libsmb/libsmb_server.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c index 4dbc2652d2..755ef2d32b 100644 --- a/source3/libsmb/libsmb_server.c +++ b/source3/libsmb/libsmb_server.c @@ -246,7 +246,7 @@ SMBC_server_internal(TALLOC_CTX *ctx, { SMBCSRV *srv=NULL; char *workgroup = NULL; - struct cli_state *c; + struct cli_state *c = NULL; const char *server_n = server; int is_ipc = (share != NULL && strcmp(share, "IPC$") == 0); uint32 fs_attrs = 0; @@ -586,6 +586,10 @@ done: workgroup = *pp_workgroup; } if(!workgroup) { + if (c != NULL) { + cli_shutdown(c); + } + SAFE_FREE(srv); return NULL; } |