1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Update libbacktrace to ca0de0517.

This commit is contained in:
Bartosz Taudul
2020-03-01 12:55:32 +01:00
parent c36ed4b8b8
commit fdc3b01054
13 changed files with 3627 additions and 2057 deletions
+13 -2
View File
@@ -1,5 +1,5 @@
/* alloc.c -- Memory allocation without mmap.
Copyright (C) 2012-2018 Free Software Foundation, Inc.
Copyright (C) 2012-2020 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
@@ -150,13 +150,24 @@ backtrace_vector_release (struct backtrace_state *state ATTRIBUTE_UNUSED,
backtrace_error_callback error_callback,
void *data)
{
vec->alc = 0;
if (vec->size == 0)
{
/* As of C17, realloc with size 0 is marked as an obsolescent feature, use
free instead. */
rpfree (vec->base);
vec->base = NULL;
return 1;
}
vec->base = rprealloc (vec->base, vec->size);
if (vec->base == NULL)
{
error_callback (data, "realloc", errno);
return 0;
}
vec->alc = 0;
return 1;
}