diff options
author | Sumit Bose <sbose@redhat.com> | 2011-08-10 17:53:56 +0200 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2013-07-11 15:16:55 +1000 |
commit | 157f1cfefd898aa7fb3dc67796565e4d5ad3d37c (patch) | |
tree | 69c2e111284d2850afd15b495ed9c2c403d90509 /ctdb/server/ctdb_ltdb_server.c | |
parent | d039f799ac426c903289800edc8febabe5bec49d (diff) | |
download | samba-157f1cfefd898aa7fb3dc67796565e4d5ad3d37c.tar.gz samba-157f1cfefd898aa7fb3dc67796565e4d5ad3d37c.tar.xz samba-157f1cfefd898aa7fb3dc67796565e4d5ad3d37c.zip |
Fixes for various issues found by Coverity
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 05bfdbbd0d4abdfbcf28e3930086723508b35952)
Diffstat (limited to 'ctdb/server/ctdb_ltdb_server.c')
-rw-r--r-- | ctdb/server/ctdb_ltdb_server.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ctdb/server/ctdb_ltdb_server.c b/ctdb/server/ctdb_ltdb_server.c index 6b27e290c9e..57e0d68b71d 100644 --- a/ctdb/server/ctdb_ltdb_server.c +++ b/ctdb/server/ctdb_ltdb_server.c @@ -1187,7 +1187,10 @@ static int ctdb_attach_persistent(struct ctdb_context *ctdb, int invalid_name = 0; s = talloc_strdup(ctdb, de->d_name); - CTDB_NO_MEMORY(ctdb, s); + if (s == NULL) { + closedir(d); + CTDB_NO_MEMORY(ctdb, s); + } /* only accept names ending in .tdb */ p = strstr(s, ".tdb."); |