[GRASS-SVN] r53208 - grass/trunk/lib/proj

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 18 08:09:25 PDT 2012


Author: mmetz
Date: 2012-09-18 08:09:24 -0700 (Tue, 18 Sep 2012)
New Revision: 53208

Modified:
   grass/trunk/lib/proj/ellipse.c
Log:
projlib: fix r35667

Modified: grass/trunk/lib/proj/ellipse.c
===================================================================
--- grass/trunk/lib/proj/ellipse.c	2012-09-18 13:50:05 UTC (rev 53207)
+++ grass/trunk/lib/proj/ellipse.c	2012-09-18 15:09:24 UTC (rev 53208)
@@ -71,7 +71,7 @@
 	/* else use ellipsoid defined in PROJ_INFO */
 	ellps = G_store(G_find_key_value("ellps", proj_keys));
 
-    if (ellps != NULL) {
+    if (ellps != NULL && *ellps) {
 	if (GPJ_get_ellipsoid_by_name(ellps, &estruct) < 0)
 	    G_fatal_error(_("Invalid ellipsoid <%s> in file"), ellps);
 
@@ -84,6 +84,9 @@
 	return 1;
     }
     else {
+	if (ellps)    /* *ellps = '\0' */
+	    G_free(ellps);
+
 	str3 = G_find_key_value("a", proj_keys);
 	if (str3 != NULL) {
 	    char *str4;



More information about the grass-commit mailing list