summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2011-11-19 18:50:49 +0000
committerFelipe Pena <felipe@php.net>2011-11-19 18:50:49 +0000
commit276518ff174a8d8a416cef8ada75dd803ae6591c (patch)
treebee728980c96b1d692f912729101ca66e6309ad2
parent2bd90344a6a9dbe9eea75922d6287701c3319630 (diff)
downloadphp-git-276518ff174a8d8a416cef8ada75dd803ae6591c.tar.gz
- Fixed bug #60339 (valgrind reports LEAK --with-mm)
patch by: yohgaki at ohgaki dot net
-rw-r--r--ext/session/mod_mm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/session/mod_mm.c b/ext/session/mod_mm.c
index 704164aa4a..47e3418c86 100644
--- a/ext/session/mod_mm.c
+++ b/ext/session/mod_mm.c
@@ -278,7 +278,7 @@ PHP_MINIT_FUNCTION(ps_mm)
ps_mm_path = emalloc(save_path_len + 1 + (sizeof(PS_MM_FILE) - 1) + mod_name_len + euid_len + 1);
memcpy(ps_mm_path, PS(save_path), save_path_len);
- if (PS(save_path)[save_path_len - 1] != DEFAULT_SLASH) {
+ if (save_path_len && PS(save_path)[save_path_len - 1] != DEFAULT_SLASH) {
ps_mm_path[save_path_len] = DEFAULT_SLASH;
save_path_len++;
}