diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-02-23 19:51:53 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-02-23 19:55:03 +0100 |
commit | ff8c223440829e3c2dde99ca0cc9ae037f28e725 (patch) | |
tree | d8b6d5cd987e1383bdf938443839943689566bc7 | |
parent | 79d001fcb699ef13f15593f155af8f3051f56353 (diff) |
Workaround ASan report memleak during call to --vty-ref-xml
For some unknown reason, using size=0 instead of 1 makes LeakSanitizer
report a leak when calling osmo-hnbgw --vty-ref-xml:
"""
==19857==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 96 byte(s) in 1 object(s) allocated from:
#0 0x7f083b4d0d28 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1d28)
#1 0x7f083a8e5661 in talloc_named_const (/usr/lib/x86_64-linux-gnu/libtalloc.so.2+0x6661)
"""
It seems iu_client.c is already using size=1.
Change-Id: I383653c981e68a053babd33dee1f0df8731752b0
-rw-r--r-- | src/hnbgw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hnbgw.c b/src/hnbgw.c index e21ec4a..965e8a4 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -576,7 +576,7 @@ int main(int argc, char **argv) int rc; tall_hnb_ctx = talloc_named_const(NULL, 0, "hnb_context"); - talloc_asn1_ctx = talloc_named_const(NULL, 0, "asn1_context"); + talloc_asn1_ctx = talloc_named_const(NULL, 1, "asn1_context"); msgb_talloc_ctx_init(tall_hnb_ctx, 0); g_hnb_gw = hnb_gw_create(tall_hnb_ctx); |