Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gen_stats.c: Duplicate xstats buffer for later use
The gnet_stats_copy_app() function gets called, more often than not, with its second argument a pointer to an automatic variable in the caller's stack. Therefore, to avoid copying garbage afterwards when calling gnet_stats_finish_copy(), this data is better copied to a dynamically allocated memory that gets freed after use. [[email protected]: remove a useless kfree()] Signed-off-by: Ignacy Gawędzki <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information