Skip to content

Commit

Permalink
correct the NULL-pointer test
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Aug 4, 2015
1 parent 877de3a commit fa51f70
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sql/item_sum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3518,9 +3518,10 @@ bool Item_func_group_concat::setup(THD *thd)
{
uint n_elems= arg_count_order + all_fields.elements;
ref_pointer_array= static_cast<Item**>(thd->alloc(sizeof(Item*) * n_elems));
if (!ref_pointer_array)
DBUG_RETURN(TRUE);
memcpy(ref_pointer_array, args, arg_count * sizeof(Item*));
if (!ref_pointer_array ||
setup_order(thd, ref_pointer_array, context->table_list, list,
if (setup_order(thd, ref_pointer_array, context->table_list, list,
all_fields, *order))
DBUG_RETURN(TRUE);
}
Expand Down

0 comments on commit fa51f70

Please sign in to comment.