Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
filebundle: fix wrong malloc() in fb_scandir() - coverity
  • Loading branch information
perexg committed Oct 3, 2014
1 parent 0b991ef commit 6daddcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/filebundle.c
Expand Up @@ -344,7 +344,7 @@ int fb_scandir ( const char *path, fb_dirent ***list )
const filebundle_entry_t *fb;
ret = dir->b.root->d.count;
fb = dir->b.root->d.child;
*list = malloc(ret * sizeof(fb_dirent));
*list = malloc(ret * sizeof(fb_dirent*));
i = 0;
while (fb) {
(*list)[i] = calloc(1, sizeof(fb_dirent));
Expand Down

0 comments on commit 6daddcc

Please sign in to comment.