aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/printcmds.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/printcmds.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/printcmds.c')
-rw-r--r--gdb/testsuite/gdb.base/printcmds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/printcmds.c b/gdb/testsuite/gdb.base/printcmds.c
index d80c13d..57e04e6 100644
--- a/gdb/testsuite/gdb.base/printcmds.c
+++ b/gdb/testsuite/gdb.base/printcmds.c
@@ -218,10 +218,11 @@ char invalid_RRR[] = "aaaaaaaaaaaaaaaaaaaa"
int main ()
{
- malloc(1);
+ void *p = malloc (1);
/* Prevent AIX linker from removing variables. */
return ctable1[0] + ctable2[0] + int1dim[0] + int2dim[0][0]
+ int3dim[0][0][0] + int4dim[0][0][0][0] + teststring[0] +
*parrays -> array1 + a1[0] + a2[0];
+ free (p);
}