Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: msnyder@sonic.net
To: "Nick Roberts" <nickrob@snap.net.nz>
Cc: msnyder@sonic.net, gdb-patches@sourceware.org
Subject: Re: [patch] memory leak, mi-cmd-var
Date: Fri, 29 Jun 2007 04:35:00 -0000	[thread overview]
Message-ID: <16794.12.7.175.2.1183091519.squirrel@webmail.sonic.net> (raw)
In-Reply-To: <18052.32294.978000.582803@kahikatea.snap.net.nz>


 > 'nother one from Coverity.
 >
 > 2007-06-28  Michael Snyder  <msnyder@access-company.com>
 >
 >      * mi/mi-cmd-var.c (mi_cmd_var_set_format): Free strduped memory
 >      (Coverity).  Also take the opportunity to call error earlier
 >      (before strdup).

> I don't see why the string has to be duplicated in the first place or how
> argv[1] could be NULL.  Why not just:

Well... you're right!  At least about the strdup.

About the NULL check -- it was already there, so I don't favor removing
it unles we can demonstrate that it can't be NULL.  But I'll re-submit
after eliminating the strdup.



      reply	other threads:[~2007-06-29  4:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-29  3:36 msnyder
2007-06-29  4:32 ` Nick Roberts
2007-06-29  4:35   ` msnyder [this message]

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=16794.12.7.175.2.1183091519.squirrel@webmail.sonic.net \
    --to=msnyder@sonic.net \
    --cc=gdb-patches@sourceware.org \
    --cc=nickrob@snap.net.nz \
    /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