[SCM] Samba Shared Repository - branch master updated
Michael Adam
obnox at samba.org
Wed Apr 1 07:37:03 MDT 2015
The branch, master has been updated
via 12309f8 ctdb: check for talloc_asprintf() failure
via 801bdcd ctdb: Coverity fix for CID 1291643
from cd4442c s3-passdb: Fix 'force user' with winbind default domain
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 12309f8bfb70878bec5fcec4681eb4e463e07357
Author: David Disseldorp <ddiss at samba.org>
Date: Tue Mar 31 18:06:43 2015 +0200
ctdb: check for talloc_asprintf() failure
Signed-off-by: David Disseldorp <ddiss at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
Autobuild-User(master): Michael Adam <obnox at samba.org>
Autobuild-Date(master): Wed Apr 1 15:36:03 CEST 2015 on sn-devel-104
commit 801bdcde6a7a92acfdb26d87a17a33802e166a2d
Author: Rajesh Joseph <rjoseph at redhat.com>
Date: Tue Mar 31 18:43:36 2015 +0530
ctdb: Coverity fix for CID 1291643
CID 1291643: Resource leak: leaked_handle: Handle
variable lock_fd going out of scope leaks the handle.
Fix: on failure case release handle variable lock_fd
Signed-off-by: Rajesh Joseph <rjoseph at redhat.com>
Reviewed-by: Michael Adam <obnox at samba.org>
Reviewed-by: David Disseldorp <ddiss at samba.org>
-----------------------------------------------------------------------
Summary of changes:
ctdb/tcp/tcp_connect.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
Changeset truncated at 500 lines:
diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c
index 6950ac8..b106f22 100644
--- a/ctdb/tcp/tcp_connect.c
+++ b/ctdb/tcp/tcp_connect.c
@@ -347,10 +347,20 @@ static int ctdb_tcp_listen_automatic(struct ctdb_context *ctdb)
ctdb->address = talloc_memdup(ctdb,
&ctdb->nodes[i]->address,
sizeof(ctdb_sock_addr));
- CTDB_NO_MEMORY(ctdb, ctdb->address);
+ if (ctdb->address == NULL) {
+ ctdb_set_error(ctdb, "Out of memory at %s:%d",
+ __FILE__, __LINE__);
+ goto failed;
+ }
+
ctdb->name = talloc_asprintf(ctdb, "%s:%u",
ctdb_addr_to_str(ctdb->address),
ctdb_addr_to_port(ctdb->address));
+ if (ctdb->name == NULL) {
+ ctdb_set_error(ctdb, "Out of memory at %s:%d",
+ __FILE__, __LINE__);
+ goto failed;
+ }
DEBUG(DEBUG_INFO,("ctdb chose network address %s\n", ctdb->name));
if (listen(ctcp->listen_fd, 10) == -1) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list