unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* scm_must_free
@ 2002-08-22  0:07 Han-Wen Nienhuys
  2002-08-26 22:03 ` scm_must_free Marius Vollmer
  0 siblings, 1 reply; 2+ messages in thread
From: Han-Wen Nienhuys @ 2002-08-22  0:07 UTC (permalink / raw)



Why does scm_must_free barf on freeing the null pointer?

       free()  frees  the  memory  space pointed to by ptr, which
       must have been returned by a previous  call  to  malloc(),
       calloc()  or  realloc().   Otherwise,  or if free(ptr) has
       already been called before,  undefined  behaviour  occurs.
       If ptr is NULL, no operation is performed.





-- 

Han-Wen Nienhuys   |   hanwen@cs.uu.nl   |   http://www.cs.uu.nl/~hanwen 


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: scm_must_free
  2002-08-22  0:07 scm_must_free Han-Wen Nienhuys
@ 2002-08-26 22:03 ` Marius Vollmer
  0 siblings, 0 replies; 2+ messages in thread
From: Marius Vollmer @ 2002-08-26 22:03 UTC (permalink / raw)
  Cc: guile-devel

Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:

> Why does scm_must_free barf on freeing the null pointer?

I don't know.  scm_must_free is on its way out anyway so we might not
want to bother.  (See scm_gc_malloc etc for the functions that it is
replaced with, in HEAD.)

scm_must_malloc can't return a NULL pointer, so maybe that's the reason.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-26 22:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-22  0:07 scm_must_free Han-Wen Nienhuys
2002-08-26 22:03 ` scm_must_free Marius Vollmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).