forked from Imagelibrary/binutils-gdb
use xmalloc() and xfree().
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2001-10-31 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
||||||
* varobj.c: Replace value_ptr with ``struct value *''.
|
* varobj.c: Replace value_ptr with ``struct value *''.
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ int
|
|||||||
s390_insert_watchpoint (int pid, CORE_ADDR addr, int len, int rw)
|
s390_insert_watchpoint (int pid, CORE_ADDR addr, int len, int rw)
|
||||||
{
|
{
|
||||||
CORE_ADDR hi_addr = addr + len - 1;
|
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)
|
if (newarea)
|
||||||
@@ -205,7 +205,7 @@ s390_remove_watchpoint (int pid, CORE_ADDR addr, int len)
|
|||||||
}
|
}
|
||||||
if (matchCurr)
|
if (matchCurr)
|
||||||
{
|
{
|
||||||
free (matchCurr);
|
xfree (matchCurr);
|
||||||
watch_area_cnt--;
|
watch_area_cnt--;
|
||||||
if (watch_area_cnt)
|
if (watch_area_cnt)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user