leaks: check return values of libunwind calls

This commit is contained in:
Guillaume Desmottes 2016-07-11 11:34:02 +02:00 committed by Tim-Philipp Müller
parent 1ff80fbf52
commit 59885c2a92

View file

@ -194,10 +194,13 @@ generate_unwind_trace (void)
unw_cursor_t cursor;
GString *trace;
trace = g_string_new (NULL);
unw_getcontext (&ctx);
unw_init_local (&cursor, &ctx);
if (unw_getcontext (&ctx))
return NULL;
if (unw_init_local (&cursor, &ctx))
return NULL;
trace = g_string_new (NULL);
while (unw_step (&cursor) > 0) {
char name[BT_NAME_SIZE];
unw_word_t offp;