Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #24221

Re: Trying to figure out how to dynamically re-allocate strings while concatenating

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail
NNTP-Posting-Date Sat, 04 Aug 2012 16:12:58 -0500
Message-ID <501D9055.1408@mindspring.com> (permalink)
Date Sat, 04 Aug 2012 17:12:53 -0400
From pete <pfiland@mindspring.com>
Reply-To pfiland@mindspring.com
Organization PF
X-Mailer Mozilla 3.04Gold (WinNT; I)
MIME-Version 1.0
Newsgroups comp.lang.c
Subject Re: Trying to figure out how to dynamically re-allocate strings while concatenating
References <eb47af15-f8ff-4737-983d-3f54307c1081@googlegroups.com> <check-20120804172635@ram.dialup.fu-berlin.de> <501D4D74.F6C@mindspring.com> <jvjnos$s01$1@dont-email.me>
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Lines 18
X-Usenet-Provider http://www.giganews.com
NNTP-Posting-Host 4.154.221.233
X-Trace sv3-rygB1tZBI1C7Wmwpy/FJ5eBQe8XoHxaw3j7OliCFfYTp7LlOHz/Q0rwYFbKelm7Yl4G4jV6WyGZ5wRB!6Pdl660Be0YHyxc0c2hQzjKR0xfrarGZGUC7gDKsUoP+RkEZ077nxE+v1flIQrNIKF9qV/SN9ZF+!aCnTnSUG5l8=
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 1696
Xref csiph.com comp.lang.c:24221

Show key headers only | View raw


Eric Sosman wrote:
> 
> On 8/4/2012 12:27 PM, pete wrote:
> >[...]
> > I see from your call to the free function,
> > that you intend to free the allocated memory within main.
> >
> > If either call to strapp returns a null pointer,
> > then your call to free, will free a null pointer instead.
> 
>      ... which is harmless, defined as a no-op.

But then, 
freeing the allocated memory from within main, 
doesn't happen as it was apparently intended to happen.

-- 
pete

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Trying to figure out how to dynamically re-allocate strings while concatenating Shriramana Sharma <jamadagni@gmail.com> - 2012-08-04 07:12 -0700
  Re: Trying to figure out how to dynamically re-allocate strings while concatenating Xavier Roche <xroche@free.fr.NOSPAM.invalid> - 2012-08-04 16:17 +0200
  Re: Trying to figure out how to dynamically re-allocate strings while concatenating Xavier Roche <xroche@free.fr.NOSPAM.invalid> - 2012-08-04 16:22 +0200
    Re: Trying to figure out how to dynamically re-allocate strings while concatenating Shriramana Sharma <jamadagni@gmail.com> - 2012-08-04 07:25 -0700
      Re: Trying to figure out how to dynamically re-allocate strings while concatenating Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-08-04 16:04 +0100
  Re: Trying to figure out how to dynamically re-allocate strings while concatenating "Heinrich Wolf" <invalid@invalid.invalid> - 2012-08-04 16:29 +0200
  Re: Trying to figure out how to dynamically re-allocate strings while concatenating Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-04 10:52 -0400
  Re: Trying to figure out how to dynamically re-allocate strings while concatenating pete <pfiland@mindspring.com> - 2012-08-04 12:27 -0400
    Re: Trying to figure out how to dynamically re-allocate strings while concatenating Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-04 13:56 -0400
      Re: Trying to figure out how to dynamically re-allocate strings while  concatenating pete <pfiland@mindspring.com> - 2012-08-04 17:12 -0400
  Re: Trying to figure out how to dynamically re-allocate strings while concatenating pete <pfiland@mindspring.com> - 2012-08-04 12:42 -0400
    Re: Trying to figure out how to dynamically re-allocate strings while concatenating Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-04 14:00 -0400
    Re: Trying to figure out how to dynamically re-allocate strings while concatenating Keith Thompson <kst-u@mib.org> - 2012-08-04 17:00 -0700
      Re: Trying to figure out how to dynamically re-allocate strings while concatenating pete <pfiland@mindspring.com> - 2012-08-04 20:48 -0400
      Re: Trying to figure out how to dynamically re-allocate strings while concatenating Jens Gustedt <jens.gustedt@loria.fr> - 2012-08-05 09:22 +0200
        Re: Trying to figure out how to dynamically re-allocate strings while concatenating Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-08-05 12:49 +0100
          Re: Trying to figure out how to dynamically re-allocate strings while concatenating Jens Gustedt <jens.gustedt@loria.fr> - 2012-08-05 17:12 +0200
          Re: Trying to figure out how to dynamically re-allocate strings while concatenating Keith Thompson <kst-u@mib.org> - 2012-08-05 13:17 -0700
            Re: Trying to figure out how to dynamically re-allocate strings while concatenating Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-08-05 22:53 +0100
  Re: Trying to figure out how to dynamically re-allocate strings while concatenating Shriramana Sharma <jamadagni@gmail.com> - 2012-08-04 19:20 -0700
  Re: C Vs Asm i use for cat function "io_x" <a@b.c.invalid> - 2012-08-05 08:15 +0200
    Re: C Vs Asm i use for cat function "BartC" <bc@freeuk.com> - 2012-08-05 10:22 +0100
      Re: C Vs Asm i use for cat function "Heinrich Wolf" <invalid@invalid.invalid> - 2012-08-05 17:00 +0200
        Re: C Vs Asm i use for cat function Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-08-05 16:20 +0100
      Re: C Vs Asm i use for cat function "io_x" <a@b.c.invalid> - 2012-08-05 19:51 +0200
        Re: C Vs Asm i use for cat function "BartC" <bc@freeuk.com> - 2012-08-05 21:04 +0100
  Re: Trying to figure out how to dynamically re-allocate strings while concatenating Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2012-08-10 10:45 +0300

csiph-web