summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/providers/proxy/proxy_services.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/providers/proxy/proxy_services.c b/src/providers/proxy/proxy_services.c
index e9f3b3f5c..474959039 100644
--- a/src/providers/proxy/proxy_services.c
+++ b/src/providers/proxy/proxy_services.c
@@ -198,7 +198,7 @@ enum_services(struct proxy_id_ctx *ctx,
char *newbuf;
errno_t ret, sret;
time_t now = time(NULL);
- const char *protocols[2] = { NULL, NULL };
+ const char **protocols;
const char **cased_aliases;
bool again;
@@ -222,6 +222,12 @@ enum_services(struct proxy_id_ctx *ctx,
goto done;
}
+ protocols = talloc_zero_array(tmpctx, const char *, 2);
+ if (protocols == NULL) {
+ ret = ENOMEM;
+ goto done;
+ }
+
ret = sysdb_transaction_start(sysdb);
if (ret) {
DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to start transaction\n"));