diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2020-08-03 15:21:59 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-08-03 19:08:58 -0700 |
commit | fd50b3fc45d35549b842a3ac4889b10f7fcf574c (patch) | |
tree | cbc6d598ce9424ba65ae18671070801bb0f27d74 | |
parent | a1436544ff826b8c51242f4afb7c5d485c8e2e32 (diff) | |
download | emacs-fd50b3fc45d35549b842a3ac4889b10f7fcf574c.tar.gz emacs-fd50b3fc45d35549b842a3ac4889b10f7fcf574c.tar.bz2 emacs-fd50b3fc45d35549b842a3ac4889b10f7fcf574c.zip |
Ignore another memory leak
* src/pdumper.c (dump_mmap_contiguous_heap):
Ignore the heap control block when checking for leaks.
-rw-r--r-- | src/pdumper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pdumper.c b/src/pdumper.c index 865ceff6fff..63ee0fcb7f6 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -4680,15 +4680,15 @@ dump_mmap_contiguous_heap (struct dump_memory_map *maps, int nr_maps, Beware: the simple patch 2019-03-11T15:20:54Z!eggert@cs.ucla.edu is worse, as it sometimes frees this storage twice. */ struct dump_memory_map_heap_control_block *cb = calloc (1, sizeof (*cb)); - - char *mem; if (!cb) goto out; + __lsan_ignore_object (cb); + cb->refcount = 1; cb->mem = malloc (total_size); if (!cb->mem) goto out; - mem = cb->mem; + char *mem = cb->mem; for (int i = 0; i < nr_maps; ++i) { struct dump_memory_map *map = &maps[i]; |