Skip to content

Commit fa51f70

Browse files
committed
correct the NULL-pointer test
1 parent 877de3a commit fa51f70

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sql/item_sum.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3518,9 +3518,10 @@ bool Item_func_group_concat::setup(THD *thd)
35183518
{
35193519
uint n_elems= arg_count_order + all_fields.elements;
35203520
ref_pointer_array= static_cast<Item**>(thd->alloc(sizeof(Item*) * n_elems));
3521+
if (!ref_pointer_array)
3522+
DBUG_RETURN(TRUE);
35213523
memcpy(ref_pointer_array, args, arg_count * sizeof(Item*));
3522-
if (!ref_pointer_array ||
3523-
setup_order(thd, ref_pointer_array, context->table_list, list,
3524+
if (setup_order(thd, ref_pointer_array, context->table_list, list,
35243525
all_fields, *order))
35253526
DBUG_RETURN(TRUE);
35263527
}

0 commit comments

Comments
 (0)