mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-26 19:44:11 +08:00
* memory corruption fix
Wed Mar 22 15:24:21 2000 glen mccready <gkm@pobox.com> * wrapper.c (sim_open,sim_close): Copy into myname, free myname.
This commit is contained in:
parent
6837a0a2a9
commit
6c9e0292a3
@ -1,3 +1,7 @@
|
||||
Wed Mar 22 15:24:21 2000 glen mccready <gkm@pobox.com>
|
||||
|
||||
* wrapper.c (sim_open,sim_close): Copy into myname, free myname.
|
||||
|
||||
2000-02-08 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* wrapper.c: Fix compile time warning messages.
|
||||
|
@ -352,7 +352,8 @@ sim_open (kind, ptr, abfd, argv)
|
||||
char **argv;
|
||||
{
|
||||
sim_kind = kind;
|
||||
myname = argv[0];
|
||||
if (myname) free (myname);
|
||||
myname = xstrdup (argv[0]);
|
||||
sim_callback = ptr;
|
||||
|
||||
/* Decide upon the endian-ness of the processor.
|
||||
@ -410,7 +411,8 @@ sim_close (sd, quitting)
|
||||
SIM_DESC sd ATTRIBUTE_UNUSED;
|
||||
int quitting ATTRIBUTE_UNUSED;
|
||||
{
|
||||
/* nothing to do */
|
||||
if (myname) free (myname);
|
||||
myname = NULL;
|
||||
}
|
||||
|
||||
SIM_RC
|
||||
|
Loading…
Reference in New Issue
Block a user