ctdb-tests: CID 1125635 Dereference null return value (NULL_RETURNS)
authorMartin Schwenke <martin@meltin.net>
Fri, 2 Sep 2016 03:23:36 +0000 (13:23 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 8 Sep 2016 04:57:21 +0000 (06:57 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12244

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/src/rb_test.c

index e5c3de6c390de0dea70a59cd624b966f4d04c4af..7dc062915c4a49193c4c2a0481eaccfa3b3db82f 100644 (file)
@@ -143,6 +143,7 @@ int main(int argc, const char *argv[])
         */
        for (i=0; i<num_records; i++) {
                data = trbt_lookup32(tree, i);
+               assert(data != NULL);
                if (i < 3) {
                        assert(*data == 1);
                } else {