mirror of
https://github.com/BertoldVdb/ZoneDetect.git
synced 2026-03-25 08:45:56 +00:00
Fix memory leak in issue #46
Fix memory leak found in https://github.com/BertoldVdb/ZoneDetect/issues/46. Free memory which is not used nor freed nor returned from a function.
This commit is contained in:
parent
082fa6b148
commit
1dc78b572d
1 changed files with 2 additions and 1 deletions
|
|
@ -618,6 +618,7 @@ float* ZDPolygonToList(const ZoneDetect *library, uint32_t polygonId, size_t* le
|
|||
flData[i] = ZDFixedPointToFloat(lat, 90, library->precision);
|
||||
flData[i+1] = ZDFixedPointToFloat(lon, 180, library->precision);
|
||||
}
|
||||
free(data);
|
||||
|
||||
if(lengthPtr) {
|
||||
*lengthPtr = length;
|
||||
|
|
@ -1257,4 +1258,4 @@ done:
|
|||
void ZDHelperSimpleLookupStringFree(char* str)
|
||||
{
|
||||
free(str);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue