summaryrefslogtreecommitdiff
path: root/lib/tdb
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2019-06-13 13:39:22 +0000
committerNoel Power <npower@samba.org>2019-06-26 10:30:23 +0000
commitcf43f1d052a44bea08bef09ea5eace77143c8093 (patch)
treea8832555d69a512d67ff483eefbe1192de15ba8d /lib/tdb
parent7987e4af96b1c2b285834a9d3a9c00b028039737 (diff)
downloadsamba-cf43f1d052a44bea08bef09ea5eace77143c8093.tar.gz
clang: Fix Null pointer passed as argument warning
Fixes: lib/tdb/common/transaction.c:354:2: warning: Null pointer passed as an argument to a 'nonnull' parameter <--[clang] memcpy(tdb->transaction->blocks[blk] + off, buf, len); & Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'lib/tdb')
-rw-r--r--lib/tdb/common/transaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c
index b67f84f215d..290451b3285 100644
--- a/lib/tdb/common/transaction.c
+++ b/lib/tdb/common/transaction.c
@@ -330,7 +330,7 @@ static int transaction_write_existing(struct tdb_context *tdb, tdb_off_t off,
}
}
- if (len == 0) {
+ if (len == 0 || buf == NULL) {
return 0;
}