From: David Taylor <taylor@cygnus.com>
To: "Philippe De Muyter" <phdm@macqel.be>
Cc: gdb-patches@sourceware.cygnus.com (gdb-patches@sourceware.cygnus.com)
Subject: Re: [PATCH/RFA] language.c free(0)
Date: Thu, 16 Mar 2000 12:00:00 -0000 [thread overview]
Message-ID: <200003161958.OAA21605@texas.cygnus.com> (raw)
Message-ID: <20000316120000.jrrKiQYLo6SMI1Zs-9BGcm8x6MwKSn61PPg6TOFYghU@z> (raw)
Date: Thu, 16 Mar 100 20:26:56 +0100 (CET)
From: "Philippe De Muyter" <phdm@macqel.be>
May I inaugurate my ssh connection by applying the following patch ? Here,
gdb crashes when one attempts to free a null pointer.
Yes.
Wed Mar 15 07:04:17 2000 Philippe De Muyter <phdm@macqel.be>
* language.c (set_lang_str): Do not call `free' for a null pointer.
(set_type_str, set_range_str): Ditto.
Approved.
--- ./gdb/language.c Mon Mar 13 20:01:32 2000
+++ ./gdb/language.c Sun Feb 20 03:23:37 2000
@@ -394,7 +394,8 @@ set_lang_str ()
{
char *prefix = "";
- free (language);
+ if (language)
+ free (language);
if (language_mode == language_mode_auto)
prefix = "auto; currently ";
@@ -406,7 +407,8 @@ set_type_str ()
{
char *tmp = NULL, *prefix = "";
- free (type);
+ if (type)
+ free (type);
if (type_mode == type_mode_auto)
prefix = "auto; currently ";
@@ -451,7 +453,8 @@ set_range_str ()
error ("Unrecognized range check setting.");
}
- free (range);
+ if (range)
+ free (range);
range = concat (pref, tmp, NULL);
}
next reply other threads:[~2000-03-16 12:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-01 0:00 David Taylor [this message]
2000-03-16 12:00 ` David Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200003161958.OAA21605@texas.cygnus.com \
--to=taylor@cygnus.com \
--cc=gdb-patches@sourceware.cygnus.com \
--cc=phdm@macqel.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox