mirror of https://github.com/citusdata/citus.git
Comment user provided input memory allocation (#4163)
parent
4118560b75
commit
5723038f74
|
@ -112,7 +112,12 @@ master_run_on_worker(PG_FUNCTION_ARGS)
|
||||||
"function return type are not compatible")));
|
"function return type are not compatible")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepare storage for status and result values */
|
/*
|
||||||
|
* prepare storage for status and result values.
|
||||||
|
* commandCount is based on user input however, it is the length of list
|
||||||
|
* instead of a user given integer, hence this should be safe here in terms
|
||||||
|
* of memory allocation.
|
||||||
|
*/
|
||||||
bool *statusArray = palloc0(commandCount * sizeof(bool));
|
bool *statusArray = palloc0(commandCount * sizeof(bool));
|
||||||
StringInfo *resultArray = palloc0(commandCount * sizeof(StringInfo));
|
StringInfo *resultArray = palloc0(commandCount * sizeof(StringInfo));
|
||||||
for (int commandIndex = 0; commandIndex < commandCount; commandIndex++)
|
for (int commandIndex = 0; commandIndex < commandCount; commandIndex++)
|
||||||
|
|
Loading…
Reference in New Issue