aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2020-08-03 15:21:59 -0700
committerPaul Eggert2020-08-03 19:08:58 -0700
commitfd50b3fc45d35549b842a3ac4889b10f7fcf574c (patch)
treecbc6d598ce9424ba65ae18671070801bb0f27d74 /src
parenta1436544ff826b8c51242f4afb7c5d485c8e2e32 (diff)
downloademacs-fd50b3fc45d35549b842a3ac4889b10f7fcf574c.tar.gz
emacs-fd50b3fc45d35549b842a3ac4889b10f7fcf574c.zip
Ignore another memory leak
* src/pdumper.c (dump_mmap_contiguous_heap): Ignore the heap control block when checking for leaks.
Diffstat (limited to 'src')
-rw-r--r--src/pdumper.c6
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,
4680 Beware: the simple patch 2019-03-11T15:20:54Z!eggert@cs.ucla.edu 4680 Beware: the simple patch 2019-03-11T15:20:54Z!eggert@cs.ucla.edu
4681 is worse, as it sometimes frees this storage twice. */ 4681 is worse, as it sometimes frees this storage twice. */
4682 struct dump_memory_map_heap_control_block *cb = calloc (1, sizeof (*cb)); 4682 struct dump_memory_map_heap_control_block *cb = calloc (1, sizeof (*cb));
4683
4684 char *mem;
4685 if (!cb) 4683 if (!cb)
4686 goto out; 4684 goto out;
4685 __lsan_ignore_object (cb);
4686
4687 cb->refcount = 1; 4687 cb->refcount = 1;
4688 cb->mem = malloc (total_size); 4688 cb->mem = malloc (total_size);
4689 if (!cb->mem) 4689 if (!cb->mem)
4690 goto out; 4690 goto out;
4691 mem = cb->mem; 4691 char *mem = cb->mem;
4692 for (int i = 0; i < nr_maps; ++i) 4692 for (int i = 0; i < nr_maps; ++i)
4693 { 4693 {
4694 struct dump_memory_map *map = &maps[i]; 4694 struct dump_memory_map *map = &maps[i];