aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/charset-malloc.c
diff options
context:
space:
mode:
authorLuis Machado <lgustavo@codesourcery.com>2013-11-27 10:39:26 -0200
committerLuis Machado <lgustavo@codesourcery.com>2013-11-27 10:39:26 -0200
commit0db4ca1856d6131e726434ff67cbe42a5e1f81d1 (patch)
tree584a25e62d26fe7a2a9fb97be38eb40c04c0563b /gdb/testsuite/gdb.base/charset-malloc.c
parent48d5accb7a8b0b5195628b05e1f1dbf0c9cc4a22 (diff)
downloadgdb-0db4ca1856d6131e726434ff67cbe42a5e1f81d1.zip
gdb-0db4ca1856d6131e726434ff67cbe42a5e1f81d1.tar.gz
gdb-0db4ca1856d6131e726434ff67cbe42a5e1f81d1.tar.bz2
* gdb.base/callfuncs.c (main): Assign malloc's return value
and free it afterwards. * gdb.base/charset-malloc.c (malloc_stub): Likewise. * gdb.base/printcmds.c (main): Likewise. * gdb.base/randomize.c (main): Free "p" and change breakpoint marker position. * gdb.base/setvar.c (dummy): Assign malloc's return value and free it afterwards.
Diffstat (limited to 'gdb/testsuite/gdb.base/charset-malloc.c')
-rw-r--r--gdb/testsuite/gdb.base/charset-malloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/charset-malloc.c b/gdb/testsuite/gdb.base/charset-malloc.c
index 58242a2..565f872 100644
--- a/gdb/testsuite/gdb.base/charset-malloc.c
+++ b/gdb/testsuite/gdb.base/charset-malloc.c
@@ -31,5 +31,6 @@ malloc_stub (void)
{
/* charset.exp wants to allocate memory for constants. So make sure malloc
gets linked into the program. */
- malloc (1);
+ void *p = malloc (1);
+ free (p);
}