cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/07/11:54:48

Message-Id: <m0z4ooc-000S4eC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: Endlisnis <s257m AT unb DOT ca>, Grzegorz Adam Hankiewicz <gah AT jet DOT es>,
djgpp AT delorie DOT com
Date: Fri, 7 Aug 1998 13:03:16 +0000
MIME-Version: 1.0
Subject: Re: How do I free the allocated memory?
In-reply-to: <35CB1C54.ECBF9EB@unb.ca>

Endlisnis <s257m AT unb DOT ca> wrote:

> Salvador Eduardo Tropea (SET) wrote:
> 
> > 1) Don't allocate the memory before checking new_str.
> > >       char *new_str;
> > >       if (new_str == NULL) return NULL;
> > SET
> 
>     Isn't 'new_str' initalized to whatever happens to be in memory?  Isn't the whole point to check to see if
> malloc was able to allocate the space?  If so, how could you check for an error before the function is called?

I allready rectified it, is old_str ....
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019