aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Domani <ssbssa@yahoo.de>2019-12-24 13:14:01 +0100
committerHannes Domani <ssbssa@yahoo.de>2020-01-03 17:57:03 +0100
commit25057eb004b9a6e55b96f64176bb27cf0c457e23 (patch)
tree1ac7df5991877641a0a5d8da1cf4b1474b198b56
parent16d87673993dc1dba10cd86996a9b016af38da12 (diff)
downloadgdb-25057eb004b9a6e55b96f64176bb27cf0c457e23.zip
gdb-25057eb004b9a6e55b96f64176bb27cf0c457e23.tar.gz
gdb-25057eb004b9a6e55b96f64176bb27cf0c457e23.tar.bz2
windows_clear_solib memory leak
gdb/ChangeLog: 2020-01-03 Hannes Domani <ssbssa@yahoo.de> * windows-nat.c (windows_clear_solib): Free so_list linked list.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/windows-nat.c9
2 files changed, 12 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5547248..a7817d6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2020-01-03 Hannes Domani <ssbssa@yahoo.de>
+
+ * windows-nat.c (windows_clear_solib): Free so_list linked list.
+
2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
* MAINTAINERS (Write After Approval): Add myself.
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index fc84faa..2214caa 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -940,7 +940,14 @@ catch_errors (void (*func) ())
static void
windows_clear_solib (void)
{
- solib_start.next = NULL;
+ struct so_list *so;
+
+ for (so = solib_start.next; so; so = solib_start.next)
+ {
+ solib_start.next = so->next;
+ windows_free_so (so);
+ }
+
solib_end = &solib_start;
}