Skip to content

Commit

Permalink
i#1729 offline traces: fix use-after-free in drmodtrack
Browse files Browse the repository at this point in the history
Fixes an error in drmodtrack: unmapping after freeing.

Review-URL: https://codereview.appspot.com/308650043
  • Loading branch information
derekbruening committed Oct 7, 2016
1 parent 135a086 commit 53468ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/drcovlib/modules.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,8 @@ drmodtrack_offline_exit(void *handle)
if (info == NULL)
return DRCOVLIB_ERROR_INVALID_PARAMETER;
dr_global_free(info->mod, info->num_mods * sizeof(*info->mod));
dr_global_free(info, sizeof(*info));
if (info->map != NULL)
dr_unmap_file((char *)info->map, info->map_size);
dr_global_free(info, sizeof(*info));
return DRCOVLIB_SUCCESS;
}

0 comments on commit 53468ef

Please sign in to comment.