mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
OSMO_ASSERT() on double-free or invalid pointer
Change-Id: I2ab8fb7b86b6f608bbd9c4f79369c64cbad88bdf
This commit is contained in:
@@ -66,6 +66,7 @@ int _talloc_free(void *ptr, const char *location)
|
||||
if (ptr == msgb_data[i]) {
|
||||
if (!msgb_inuse[i]) {
|
||||
TRACE_ERROR("%s: double_free by %s\r\n", __func__, location);
|
||||
OSMO_ASSERT(0);
|
||||
} else {
|
||||
msgb_inuse[i] = 0;
|
||||
}
|
||||
@@ -76,6 +77,7 @@ int _talloc_free(void *ptr, const char *location)
|
||||
|
||||
local_irq_restore(x);
|
||||
TRACE_ERROR("%s: invalid pointer %p from %s\r\n", __func__, ptr, location);
|
||||
OSMO_ASSERT(0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user