mirror of
https://github.com/php/php-src.git
synced 2024-12-14 12:26:19 +08:00
- Kill a couple of double frees and a memleak
@Greg: You may want to run valgrind over the filestat functions before release..
This commit is contained in:
parent
ad20b9e6bb
commit
35e0565a4b
@ -685,6 +685,7 @@ notfound:
|
||||
efree(entry);
|
||||
efree(save2);
|
||||
if (IS_EXISTS_CHECK(type)) {
|
||||
efree(arch);
|
||||
RETURN_TRUE;
|
||||
}
|
||||
goto stat_entry;
|
||||
@ -724,6 +725,7 @@ notfound:
|
||||
RETURN_FALSE;
|
||||
}
|
||||
stat_entry:
|
||||
efree(arch);
|
||||
if (!data->is_dir) {
|
||||
sb.st_size = data->uncompressed_filesize;
|
||||
sb.st_mode = data->flags & PHAR_ENT_PERM_MASK;
|
||||
@ -762,7 +764,6 @@ stat_entry:
|
||||
}
|
||||
|
||||
statme_baby:
|
||||
efree(arch);
|
||||
if (!phar->is_writeable) {
|
||||
sb.st_mode = (sb.st_mode & 0555) | (sb.st_mode & ~0777);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user