com php-src: Slightly modify and merge PR#105 from @MegaManSec: sapi/fpm/fpm/fpm_conf.c sapi/fpm/fpm/fpm_sockets.c
| From: | Rasmus Lerdorf | Date: | Wed, 21 Jan 2015 19:40:27 +0000 |
| Subject: | com php-src: Slightly modify and merge PR#105 from @MegaManSec: sapi/fpm/fpm/fpm_conf.c sapi/fpm/fpm/fpm_sockets.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84292@lists.php.net to get a copy of this message | ||
Commit: e242f871df901d5a346eccb679d463c1d683d247
Author: Rasmus Lerdorf <rasmus@php.net> Wed, 21 Jan 2015 11:39:23 -0800
Parents: 24157f396cc8c309f47440ae0c96748e0be74a73
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e242f871df901d5a346eccb679d463c1d683d247
Log:
Slightly modify and merge PR#105 from @MegaManSec
Bugs:
https://bugs.php.net/105
Changed paths:
M sapi/fpm/fpm/fpm_conf.c
M sapi/fpm/fpm/fpm_sockets.c
Diff:
diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c
index cca4e1d..d812452 100644
--- a/sapi/fpm/fpm/fpm_conf.c
+++ b/sapi/fpm/fpm/fpm_conf.c
@@ -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";
}
}
diff --git a/sapi/fpm/fpm/fpm_sockets.c b/sapi/fpm/fpm/fpm_sockets.c
index 065f63e..46ce161 100644
--- a/sapi/fpm/fpm/fpm_sockets.c
+++ b/sapi/fpm/fpm/fpm_sockets.c
@@ -297,6 +297,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;
}