Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » PHP
  • » [PATCH] fix memory leak in fpm_conf_set_array() [RSS Feed]

#1 Dec. 27, 2010 22:51:19

Cristian R.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PATCH] fix memory leak in fpm_conf_set_array()


Signed-off-by: Cristian Rodríguez <cristian.rodrig***@*pensuse.org>
---
sapi/fpm/fpm/fpm_conf.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c
index 5d6fe77..5bd7e7c 100644
--- a/sapi/fpm/fpm/fpm_conf.c
+++ b/sapi/fpm/fpm/fpm_conf.c
@@ -318,7 +318,7 @@ static char *fpm_conf_set_array(zval *key, zval *value, void **config, int conve

if (convert_to_bool) {
char *err = fpm_conf_set_boolean(value, &subconf, 0);
- if (err) return err;
+ if (err) { free(kv); return err;}
kv->value = strdup(b ? "On" : "Off");
} else {
kv->value = strdup(Z_STRVAL_P(value));--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

  • Root
  • » PHP
  • » [PATCH] fix memory leak in fpm_conf_set_array() [RSS Feed]

Board footer

Moderator control

Enjoy the 12th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support