mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Fix use-after-free.
This commit is contained in:
parent
5541cd6c97
commit
601c80466c
@ -82,7 +82,6 @@ CallstackEntry DecodeCallstackPtr( uint64_t ptr )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
symname = *sym;
|
symname = *sym;
|
||||||
free( sym );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto namelen = strlen( symname );
|
const auto namelen = strlen( symname );
|
||||||
@ -99,6 +98,8 @@ CallstackEntry DecodeCallstackPtr( uint64_t ptr )
|
|||||||
ret.file = unknown;
|
ret.file = unknown;
|
||||||
ret.line = 0;
|
ret.line = 0;
|
||||||
|
|
||||||
|
if( sym ) free( sym );
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user