aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-11-01 02:53:05 +0000
committerAndrew Cagney <cagney@redhat.com>2001-11-01 02:53:05 +0000
commit1de2edba337bae9300a6080db0500ed032adfe98 (patch)
tree2113bd48a1772c13d376551f0ae535fb20ea34e0
parent30b28db19b6dfe929dadd706aa0b9eab0da17948 (diff)
downloadgdb-1de2edba337bae9300a6080db0500ed032adfe98.zip
gdb-1de2edba337bae9300a6080db0500ed032adfe98.tar.gz
gdb-1de2edba337bae9300a6080db0500ed032adfe98.tar.bz2
use xmalloc() and xfree().
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/s390-nat.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b19d3d5..32df4a1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2001-10-31 Andrew Cagney <ac131313@redhat.com>
+ * s390-nat.c (s390_remove_watchpoint): Use xfree.
+ (s390_insert_watchpoint): Use xmalloc.
+
+2001-10-31 Andrew Cagney <ac131313@redhat.com>
+
* varobj.c: Replace value_ptr with ``struct value *''.
2001-10-31 Andrew Cagney <ac131313@redhat.com>
diff --git a/gdb/s390-nat.c b/gdb/s390-nat.c
index 623c3d1..00f6ecc 100644
--- a/gdb/s390-nat.c
+++ b/gdb/s390-nat.c
@@ -138,7 +138,7 @@ int
s390_insert_watchpoint (int pid, CORE_ADDR addr, int len, int rw)
{
CORE_ADDR hi_addr = addr + len - 1;
- watch_area *newarea = (watch_area *) malloc (sizeof (watch_area));
+ watch_area *newarea = (watch_area *) xmalloc (sizeof (watch_area));
if (newarea)
@@ -205,7 +205,7 @@ s390_remove_watchpoint (int pid, CORE_ADDR addr, int len)
}
if (matchCurr)
{
- free (matchCurr);
+ xfree (matchCurr);
watch_area_cnt--;
if (watch_area_cnt)
{