Skip to content

postpos.c: obs data memory leak #443

@alecianfe

Description

@alecianfe

Hi,
when working on post-processing positioning (function postpos in postpos.c) there is the possibility to end up with memory leak. In particular, in function execses (in postpos.c) there is a call to function readobsnav(): inside this function the library tries to read both observation and navigation files. If the reading fails the function returns immediately 0 and does not call function freeobsnav() to delete obss and navs.

Case: I upload an observation file and no navigation file. The library load all obs, but fails when trying to read the nav data. Thus, the memory has been allocated for all the obs but it is not freed after failure.

.
image

Since I'm running several post-processing every time readobsnav() fails memory increases. In the following three memory snapshots after three failures

First failure:
image

Second failure:
image

Third failure:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions