#866: Semantic of free() and G_free() for G_free_key_value()
----------------------+-----------------------------------------------------
  Reporter:  mloskot  |       Owner:  [email protected]
      Type:  defect   |      Status:  new                      
  Priority:  normal   |   Milestone:                           
 Component:  libgis   |     Version:  svn-trunk                
Resolution:           |    Keywords:  gdal                     
  Platform:  All      |         Cpu:  Unspecified              
----------------------+-----------------------------------------------------
Comment (by glynn):

 Replying to [ticket:866 mloskot]:

 > The function is [source:grass/trunk/lib/gis/key_value1...@35855#l149
 G_free_key_value] not proof against nullptr and, given purpose of this
 function, if pointer to key is null, it should do nothing. This is a
 standard semantic of free() function in C library. Moreover, G_free
 function already follows semantic of free(), so G_free_key_value() should
 do it as well.

 Fixed in r40399 (trunk).

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/866#comment:1>
GRASS GIS <http://grass.osgeo.org>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to