summaryrefslogtreecommitdiff
path: root/src/mod_fastcgi.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2022-12-10 15:15:33 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2022-12-10 15:15:33 -0500
commit5e14db43b7212b52f1cfcd2b0fce41df7fc419eb (patch)
tree1ae34085634983b89f972101f51785ce4d7ff30b /src/mod_fastcgi.c
parentabf470bebe446db762e01d04e894691390da7d45 (diff)
downloadlighttpd-git-5e14db43b7212b52f1cfcd2b0fce41df7fc419eb.tar.gz
[multiple] employ ck_calloc, ck_malloc shared code
employ ck_calloc(), ck_malloc() shared code to slightly reduce code size (centralize the ck_assert() to check that memory allocation succeeded)
Diffstat (limited to 'src/mod_fastcgi.c')
-rw-r--r--src/mod_fastcgi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mod_fastcgi.c b/src/mod_fastcgi.c
index 4d9b66a9..ae8d7e68 100644
--- a/src/mod_fastcgi.c
+++ b/src/mod_fastcgi.c
@@ -97,8 +97,7 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) {
for (; -1 != cpv->k_id; ++cpv) {
switch (cpv->k_id) {
case 0:{/* fastcgi.server */
- gw_plugin_config *gw = calloc(1, sizeof(gw_plugin_config));
- force_assert(gw);
+ gw_plugin_config *gw = ck_calloc(1, sizeof(gw_plugin_config));
if (!gw_set_defaults_backend(srv, p, cpv->v.a, gw, 0,
cpk[cpv->k_id].k)) {
gw_plugin_config_free(gw);