[tarantool-patches] [PATCH v2 1/2] Fixed invalid check in lbox_tuple_transform.

Kirill Shcherbatov kshcherbatov at tarantool.org
Fri Apr 6 19:24:41 MSK 2018


Tuple has been checked instead of new_tuple returned as box_tuple_update result.
---
 src/box/lua/tuple.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/box/lua/tuple.c b/src/box/lua/tuple.c
index 7ca4299..47b33c9 100644
--- a/src/box/lua/tuple.c
+++ b/src/box/lua/tuple.c
@@ -393,7 +393,7 @@ lbox_tuple_transform(struct lua_State *L)
 	/* Execute tuple_update */
 	struct tuple *new_tuple =
 		box_tuple_update(tuple, buf->buf, buf->buf + ibuf_used(buf));
-	if (tuple == NULL)
+	if (new_tuple == NULL)
 		luaT_error(L);
 	/* box_tuple_update() doesn't leak on exception, see public API doc */
 	luaT_pushtuple(L, new_tuple);
-- 
2.7.4





More information about the Tarantool-patches mailing list