diff --git a/psycopg/adapter_list.c b/psycopg/adapter_list.c index 5c6fa693..889c5f84 100644 --- a/psycopg/adapter_list.c +++ b/psycopg/adapter_list.c @@ -90,7 +90,9 @@ list_quote(listObject *self) * array[array[]] is */ all_nulls = 0; Py_CLEAR(qs[i]); - qs[i] = Bytes_FromString("ARRAY[]"); + if (!(qs[i] = Bytes_FromString("ARRAY[]"))) { + goto exit; + } } } else {