diff options
author | Anatol Belski <ab@php.net> | 2013-04-08 14:34:09 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2013-04-08 14:34:09 +0200 |
commit | a1f66c0b50e97cda3092405e25ba0ee1cd6c0b15 (patch) | |
tree | b9a5c75657f3d0d05d77f621195cd35a9fe6bd41 /ext/fileinfo/libmagic | |
parent | 9f0bfed43512c112369448188f0a6215224fe7a0 (diff) | |
parent | f3ca1155d684d48bca13fcba856e84b0de652a88 (diff) | |
download | php-git-a1f66c0b50e97cda3092405e25ba0ee1cd6c0b15.tar.gz |
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
Refactored the previous memleak fix
Diffstat (limited to 'ext/fileinfo/libmagic')
-rw-r--r-- | ext/fileinfo/libmagic/apprentice.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/fileinfo/libmagic/apprentice.c b/ext/fileinfo/libmagic/apprentice.c index 06d28ad5c7..0620fc7f93 100644 --- a/ext/fileinfo/libmagic/apprentice.c +++ b/ext/fileinfo/libmagic/apprentice.c @@ -492,15 +492,15 @@ apprentice_unmap(struct magic_map *map) { if (map == NULL) return; - if (map->p != NULL && map->p != php_magic_database) { - efree(map->p); - } if (map->p != php_magic_database) { int j; for (j = 0; j < MAGIC_SETS; j++) { if (map->magic[j]) efree(map->magic[j]); } + if (map->p != NULL) { + efree(map->p); + } } efree(map); } |