bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gsl] [bug #25319] allow NULL pointers in free functions


From: Brian Gough
Subject: [Bug-gsl] [bug #25319] allow NULL pointers in free functions
Date: Wed, 14 Jan 2009 17:20:12 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.17) Gecko/20080925 Fedora/false StumbleUpon/1.73 SeaMonkey/1.1.12

URL:
  <http://savannah.gnu.org/bugs/?25319>

                 Summary: allow NULL pointers in free functions
                 Project: GNU Scientific Library
            Submitted by: bjg
            Submitted on: Wed 14 Jan 2009 05:20:08 PM GMT
                Category: None
                Severity: 3 - Normal
  Уеб-?траница: 
                  Status: Confirmed
             Assigned to: None
             Open/Closed: Open
                 Release: 1.12
         Discussion Lock: Any

    _______________________________________________________

Details:

From: Leo Razoumov <address@hidden>
To: address@hidden
Subject: [Help-gsl] [PATCH] BUG FIX: allow NULL pointers in gsl_matrix_free,
gsl_rng_free, gsl_vector_free
Date: Thu, 8 Jan 2009 22:39:14 -0500 (EST)

Long standing C-language idiom allows one to pass NULL pointer 
as an argument to various "free" functions (see "man free").
Unfortunately, GSL functions gsl_matrix_free, gsl_rng_free, 
gsl_vector_free (and possibly several more) do not follow this 
convention and will crash the program if called with NULL pointer. 
This simple patch fixes the problem.

--Leo--

---
  matrix/init_source.c |    1 +
  rng/rng.c            |    1 +
  vector/init_source.c |    1 +
  3 files changed, 3 insertions(+), 0 deletions(-)

-



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 14 Jan 2009 05:20:08 PM GMT  Name: free.patch  Size: 1kB   By: bjg

<http://savannah.gnu.org/bugs/download.php?file_id=17259>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?25319>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]