]> granicus.if.org Git - php/commitdiff
Slightly modify and merge PR#105 from @MegaManSec
authorRasmus Lerdorf <rasmus@php.net>
Wed, 21 Jan 2015 19:39:23 +0000 (11:39 -0800)
committerRasmus Lerdorf <rasmus@php.net>
Wed, 21 Jan 2015 19:39:23 +0000 (11:39 -0800)
sapi/fpm/fpm/fpm_conf.c
sapi/fpm/fpm/fpm_sockets.c

index 6fb1a3dcc9d6d84893f0a32a8da10e2c22d85b8e..9a619ce8871cbbc073bd99edcaffccb10d217341 100644 (file)
@@ -574,6 +574,8 @@ static char *fpm_conf_set_array(zval *key, zval *value, void **config, int conve
        } else {
                kv->value = strdup(Z_STRVAL_P(value));
                if (fpm_conf_expand_pool_name(&kv->value) == -1) {
+                       free(kv->key);
+                       free(kv);
                        return "Can't use '$pool' when the pool is not defined";
                }
        }
index 38a7acf63d6e59f6e1bc860798c7c65b61e3caee..b5639fece70e485d4dced7b0687f2fce5c2ffa67 100644 (file)
@@ -287,6 +287,7 @@ static int fpm_socket_af_inet_listening_socket(struct fpm_worker_pool_s *wp) /*
 
        if ((status = getaddrinfo(addr, port_str, &hints, &servinfo)) != 0) {
                zlog(ZLOG_ERROR, "getaddrinfo: %s\n", gai_strerror(status));
+               free(dup_address);
                return -1;
        }