mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
gstinfo: Fix leak in generate_backtrace_trace
Spotted by Laurent Pinchart. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/901>
This commit is contained in:
parent
2546cef4be
commit
d4bcff7dab
1 changed files with 2 additions and 1 deletions
|
@ -2942,7 +2942,6 @@ generate_backtrace_trace (void)
|
|||
char **strings;
|
||||
GString *trace;
|
||||
|
||||
trace = g_string_new (NULL);
|
||||
nptrs = backtrace (buffer, BT_BUF_SIZE);
|
||||
|
||||
strings = backtrace_symbols (buffer, nptrs);
|
||||
|
@ -2950,6 +2949,8 @@ generate_backtrace_trace (void)
|
|||
if (!strings)
|
||||
return NULL;
|
||||
|
||||
trace = g_string_new (NULL);
|
||||
|
||||
for (j = 0; j < nptrs; j++)
|
||||
g_string_append_printf (trace, "%s\n", strings[j]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue