Skip to content

fix memory leaks reported by GCC -fanalyzer

Edwin Török xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2xc_core_arch_map_p2m_tree_rw: fix memory leaktools/libs/guest/xg_core_x86.c+2 -05 replies
2/2backup_ptes: fix leak on realloc failuretools/libs/guest/xg_offline_page.c+5 -21 reply

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchJuergen Gross
1/2R-b R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 0/2] fix memory leaks reported by GCC -fanalyzer

From: Edwin Török <[email protected]>

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(-)
Signature · 1 line
2.39.1