diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-05-27 18:05:16 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-05-27 18:05:16 +0000 |
commit | 440db5755211bd29af95c374882c109ede000b54 (patch) | |
tree | e738878e775cd0cd3cbfbc5b758335696056cb92 /sim/common/ChangeLog | |
parent | 432b4d03ad0f23970315e9f9dec080ab4a9ab94b (diff) | |
download | gdb-440db5755211bd29af95c374882c109ede000b54.zip gdb-440db5755211bd29af95c374882c109ede000b54.tar.gz gdb-440db5755211bd29af95c374882c109ede000b54.tar.bz2 |
sim: fix minor --sysroot mem leak
The current --sysroot parsing attempts to keep from leaking memory by
treating the empty string specially (sine this is the initial value),
but it ends up leaking memory when the arg is an empty string. So if
someone uses --sysroot "", the old value is leaked, as is the new one.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim/common/ChangeLog')
-rw-r--r-- | sim/common/ChangeLog | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index b6805db..821248d 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,9 @@ +2011-05-27 Mike Frysinger <vapier@gentoo.org> + + * sim-options.c (standard_option_handler): Remove arg[0] check + when freeing simulator_sysroot. Only strdup arg when arg[0] is + not an empty string, otherwise assign "" back to it. + 2011-05-26 Mike Frysinger <vapier@gentoo.org> * nltvals.def: Regenerate to include Blackfin syscalls again. |