mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
memdump: fix overzealous assertions from b857b2e843
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
f9bc0353c4
commit
41ef42ee94
@ -73,8 +73,10 @@ static int json_add_syminfo(void *data, uintptr_t pc UNUSED,
|
|||||||
struct json_result *response = data;
|
struct json_result *response = data;
|
||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
assert(filename != NULL);
|
/* This can happen in backtraces. */
|
||||||
assert(function != NULL);
|
if (!filename || !function)
|
||||||
|
return 0;
|
||||||
|
|
||||||
str = tal_fmt(response, "%s:%u (%s)", filename, lineno, function);
|
str = tal_fmt(response, "%s:%u (%s)", filename, lineno, function);
|
||||||
json_add_string(response, NULL, str);
|
json_add_string(response, NULL, str);
|
||||||
tal_free(str);
|
tal_free(str);
|
||||||
|
Loading…
Reference in New Issue
Block a user