All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] fix memory leaks reported by GCC -fanalyzer
@ 2023-02-24 13:36 Edwin Török
  2023-02-24 13:36 ` [PATCH v1 1/2] xc_core_arch_map_p2m_tree_rw: fix memory leak Edwin Török
  2023-02-24 13:36 ` [PATCH v1 2/2] backup_ptes: fix leak on realloc failure Edwin Török
  0 siblings, 2 replies; 9+ messages in thread
From: Edwin Török @ 2023-02-24 13:36 UTC (permalink / raw)
  To: xen-devel; +Cc: Edwin Török, Wei Liu, Anthony PERARD, Juergen Gross

From: Edwin Török <edwin.torok@cloud.com>

Using GCC 12.2.1 with -fanalyzer it has shown some memory leaks:

This is how I enabled -fanalyzer (adding it to CFLAGS for toplevel
configure didn't seem to work):

```
CFLAGS += $(call cc-option,$(CC),-fanalyzer)
```

Note that there are more errors shown than fixed here, but they seem to
be false positives (which is why this flag cannot, yet, be enabled by
default).

Edwin Török (2):
  xc_core_arch_map_p2m_tree_rw: fix memory leak
  backup_ptes: fix leak on realloc failure

 tools/libs/guest/xg_core_x86.c     | 2 ++
 tools/libs/guest/xg_offline_page.c | 7 +++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

-- 
2.39.1



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-02-27 15:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-24 13:36 [PATCH v1 0/2] fix memory leaks reported by GCC -fanalyzer Edwin Török
2023-02-24 13:36 ` [PATCH v1 1/2] xc_core_arch_map_p2m_tree_rw: fix memory leak Edwin Török
2023-02-24 14:56   ` Andrew Cooper
2023-02-27 10:36     ` Edwin Torok
2023-02-27 14:42     ` Juergen Gross
2023-02-27 14:49       ` Andrew Cooper
2023-02-27 15:00   ` [PATCH] libs/guest: Fix resource leaks in xc_core_arch_map_p2m_tree_rw() Andrew Cooper
2023-02-24 13:36 ` [PATCH v1 2/2] backup_ptes: fix leak on realloc failure Edwin Török
2023-02-24 15:00   ` Andrew Cooper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.