projects
/
php
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
248ebf0
)
fix memleak
author
Remi Collet
<remi@php.net>
Mon, 27 Jul 2015 14:56:53 +0000
(16:56 +0200)
committer
Remi Collet
<remi@php.net>
Mon, 27 Jul 2015 14:57:38 +0000
(16:57 +0200)
ext/standard/string.c
patch
|
blob
|
history
diff --git
a/ext/standard/string.c
b/ext/standard/string.c
index 27b9de94b4b53536c28719e47192bb54226589d9..a39105e20bd4e414963d13bcf0bb643d673f533d 100644
(file)
--- a/
ext/standard/string.c
+++ b/
ext/standard/string.c
@@
-1668,6
+1668,7
@@
PHP_FUNCTION(dirname)
ZSTR_LEN(ret) = zend_dirname(ZSTR_VAL(ret), str_len);
} else if (levels < 1) {
php_error_docref(NULL, E_WARNING, "Invalid argument, levels must be >= 1");
+ zend_string_free(ret);
return;
} else {
/* Some levels up */