Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The modification timestamp of the leapfile is checked with every call of lstab_utc2tai(). If the file is modified, the provided lstab structure is freed and a new one is allocated from the updated leapfile. But the new lstab is not returned to the caller as the function doesn't accept a pointer to the pointer to lstab. This causes reading from the freed memory and leak of the newly allocated memory. Modify update_leapsecond_table() to read the updated leapfile into the existing lstab structure instead of the reallocation. Signed-off-by: Miroslav Lichvar <[email protected]>
- Loading branch information