summaryrefslogtreecommitdiffstats
path: root/ctdb/tests
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2011-08-10 17:53:56 +0200
committerAmitay Isaacs <amitay@gmail.com>2013-07-11 15:16:55 +1000
commit157f1cfefd898aa7fb3dc67796565e4d5ad3d37c (patch)
tree69c2e111284d2850afd15b495ed9c2c403d90509 /ctdb/tests
parentd039f799ac426c903289800edc8febabe5bec49d (diff)
downloadsamba-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/tests')
-rw-r--r--ctdb/tests/src/ctdb_fetch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ctdb/tests/src/ctdb_fetch.c b/ctdb/tests/src/ctdb_fetch.c
index db84f5d5c4..b900efa7c3 100644
--- a/ctdb/tests/src/ctdb_fetch.c
+++ b/ctdb/tests/src/ctdb_fetch.c
@@ -83,6 +83,11 @@ static void bench_fetch_1node(struct ctdb_context *ctdb)
data.dptr = (uint8_t *)talloc_asprintf_append((char *)data.dptr,
"msg_count=%d on node %d\n",
msg_count, ctdb_get_pnn(ctdb));
+ if (data.dptr == NULL) {
+ printf("Failed to create record\n");
+ talloc_free(tmp_ctx);
+ return;
+ }
data.dsize = strlen((const char *)data.dptr)+1;
ret = ctdb_record_store(h, data);