ldb: Fix CID 1412926 Unchecked return value
authorVolker Lendecke <vl@samba.org>
Tue, 20 Jun 2017 12:50:41 +0000 (14:50 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 20 Jun 2017 16:50:06 +0000 (18:50 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/ldb/tests/ldb_msg.c

index 5261a73a2b283aa29d45e756f831b891fbfe844b..e665d5545b2ead4106b49c89c4a33c02748b57f6 100644 (file)
@@ -84,7 +84,8 @@ static void test_ldb_msg_find_duplicate_val(void **state)
        struct ldb_val dummy;
        struct ldb_val *dupe = &dummy;  /* so we can tell it was modified to NULL, not left as NULL */
 
-       ldb_msg_add_empty(msg, "el1", 0, &el);
+       ret = ldb_msg_add_empty(msg, "el1", 0, &el);
+       assert_int_equal(ret, LDB_SUCCESS);
 
        for (i = 0; i < 5; i++) {
                add_uint_value(test_ctx, msg, "el1", i);