mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:13:25 +00:00
Cleanup: avoid memory leak
Coverity CID 208314 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2fed7a9441
commit
169a55d6e8
1 changed files with 3 additions and 1 deletions
|
@ -1950,7 +1950,9 @@ int parse_dlf_buffer(unsigned char *buffer, size_t size)
|
|||
cur_latitude.udeg = (int)((ptr[7] << 24) + (ptr[6] << 16) + (ptr[5] << 8) + (ptr[4] << 0));
|
||||
cur_longitude.udeg = (int)((ptr[11] << 24) + (ptr[10] << 16) + (ptr[9] << 8) + (ptr[8] << 0));
|
||||
cur_dive->dive_site_uuid = create_dive_site_with_gps(NULL, cur_latitude, cur_longitude, cur_dive->when);
|
||||
printf("gps: %s\n", printGPSCoords(cur_latitude.udeg, cur_longitude.udeg));
|
||||
const char * coords = printGPSCoords(cur_latitude.udeg, cur_longitude.udeg);
|
||||
printf("gps: %s\n", coords);
|
||||
free((void *)coords);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue