emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master fd50b3f 3/4: Ignore another memory leak


From: Paul Eggert
Subject: master fd50b3f 3/4: Ignore another memory leak
Date: Mon, 3 Aug 2020 22:09:05 -0400 (EDT)

branch: master
commit fd50b3fc45d35549b842a3ac4889b10f7fcf574c
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    Ignore another memory leak
    
    * src/pdumper.c (dump_mmap_contiguous_heap):
    Ignore the heap control block when checking for leaks.
---
 src/pdumper.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/pdumper.c b/src/pdumper.c
index 865ceff..63ee0fc 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];



reply via email to

[Prev in Thread] Current Thread [Next in Thread]