diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/fileinfo/libmagic/apprentice.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/fileinfo/libmagic/apprentice.c b/ext/fileinfo/libmagic/apprentice.c index 8c729d13b9..06d28ad5c7 100644 --- a/ext/fileinfo/libmagic/apprentice.c +++ b/ext/fileinfo/libmagic/apprentice.c @@ -495,6 +495,13 @@ apprentice_unmap(struct magic_map *map) 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]); + } + } efree(map); } |