Opened 13 years ago

Closed 13 years ago

#3593 closed defect (fixed)

Wrong loop in msSOSAddGeometryNode()

Reported by: rouault Owned by: assefa
Priority: normal Milestone:
Component: SOS Server Version: unspecified
Severity: normal Keywords:
Cc: tomkralidis

Description

I noticed that when fixing the memory leaks of #3591 :

392	              /*add all points */
393	              for(i=0; i<psShape->line[0].numpoints; i++)
394	              {
395	                  psNode = xmlAddChild(psPointNode, msGML3Point(psNsGml, pszEpsg, NULL, psShape->line[0].point[0].x, psShape->line[0].point[0].y));
396	              }

The loop index is unused in the loop body. I guess the correct loop is :

	              /*add all points */
	              for(i=0; i<psShape->line[0].numpoints; i++)
	              {
	                  psNode = xmlAddChild(psPointNode, msGML3Point(psNsGml, pszEpsg, NULL, psShape->line[0].point[i].x, psShape->line[0].point[i].y));
	              }

Change History (2)

comment:1 by assefa, 13 years ago

Cc: tomkralidis added

Correct. Please feel free to commit.

comment:2 by rouault, 13 years ago

Resolution: fixed
Status: newclosed

Commited in r10686

Note: See TracTickets for help on using tickets.