Skip to content

Commit

Permalink
Fix mismatching alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
weltling committed Oct 23, 2017
1 parent 12e2fc4 commit fb0be39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/fileinfo/libmagic/apprentice.c
Original file line number Diff line number Diff line change
Expand Up @@ -2853,7 +2853,7 @@ apprentice_buf(struct magic_set *ms, struct magic *buf, size_t len)
{
struct magic_map *map;

if ((map = CAST(struct magic_map *, calloc(1, sizeof(*map)))) == NULL) {
if ((map = CAST(struct magic_map *, ecalloc(1, sizeof(*map)))) == NULL) {
file_oomem(ms, sizeof(*map));
return NULL;
}
Expand Down

0 comments on commit fb0be39

Please sign in to comment.