[PATCH] ldb: Fix CID 1412926 Unchecked return value
Volker Lendecke
Volker.Lendecke at SerNet.DE
Tue Jun 20 13:11:33 UTC 2017
Hi!
Review appreciated!
Thanks, Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 5a3e01b380f2e8f907454ccb992c1a64e110f621 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 20 Jun 2017 14:50:41 +0200
Subject: [PATCH] ldb: Fix CID 1412926 Unchecked return value
Signed-off-by: Volker Lendecke <vl at samba.org>
---
lib/ldb/tests/ldb_msg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/ldb/tests/ldb_msg.c b/lib/ldb/tests/ldb_msg.c
index 5261a73..e665d55 100644
--- a/lib/ldb/tests/ldb_msg.c
+++ b/lib/ldb/tests/ldb_msg.c
@@ -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);
--
2.1.4
More information about the samba-technical
mailing list