mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-14 00:26:55 +08:00
Free remaining allocation from deconstruct_array - #332
This commit is contained in:
@@ -511,6 +511,12 @@ array_to_vector(PG_FUNCTION_ARGS)
|
|||||||
errmsg("unsupported array type")));
|
errmsg("unsupported array type")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Free allocation from deconstruct_array. Do not free individual elements
|
||||||
|
* when pass-by-reference since they point to original array.
|
||||||
|
*/
|
||||||
|
pfree(elemsp);
|
||||||
|
|
||||||
/* Check elements */
|
/* Check elements */
|
||||||
for (int i = 0; i < result->dim; i++)
|
for (int i = 0; i < result->dim; i++)
|
||||||
CheckElement(result->x[i]);
|
CheckElement(result->x[i]);
|
||||||
|
|||||||
Reference in New Issue
Block a user