From 2e161ed484e63ec1e40f22f1a08e6484cb6cfe35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20H=C3=B6ger?= Date: Sun, 17 Jun 2012 19:28:36 +0200 Subject: [PATCH 10/14] Use malloc instead of dynamic size array --- _dbus_bindings/server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_dbus_bindings/server.c b/_dbus_bindings/server.c index cb489f6..0236cb6 100644 --- a/_dbus_bindings/server.c +++ b/_dbus_bindings/server.c @@ -99,7 +99,7 @@ DBusPyServer_set_auth_mechanisms(Server *self, /* scope for list */ { - const char *list[length + 1]; + char *list = malloc(sizeof(char) * (length + 1)); if (!(references = PyTuple_New(length))) goto error; @@ -131,6 +131,7 @@ DBusPyServer_set_auth_mechanisms(Server *self, Py_BEGIN_ALLOW_THREADS dbus_server_set_auth_mechanisms(self->server, list); Py_END_ALLOW_THREADS + free(list); } Py_CLEAR(fast_seq); -- 1.7.10