diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2019-01-21 01:32:53 +0000 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2019-01-21 02:49:38 +0000 |
commit | e67028f4bc5fed69b70238b1dff74f9a7d2eda1b (patch) | |
tree | 68d71d02c339c62e2adbe228c371e1d28e30b942 | |
parent | 7a3bce8fc3052359d921d980a0dc9d103ed03214 (diff) | |
download | psycopg2-e67028f4bc5fed69b70238b1dff74f9a7d2eda1b.tar.gz |
Handle failed allocation in list adaptationcode-cleanup
-rw-r--r-- | psycopg/adapter_list.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/psycopg/adapter_list.c b/psycopg/adapter_list.c index 5c6fa69..889c5f8 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 { |