Logload: fix segfault on changing and closing loading log.
ClosedPublic

Authored by Deepwarrior on Dec 7 2017, 12:15 PM.

Details

Reviewers
i.furs
NikaWhite
Summary

If data thread loading was cancelled data releases only
when cancel callback happens. Initializing of logload_data
also happens after cancel callback, because thread use data from
logload_data->thd.
When log is fully loaded module work as usual.

Test Plan

Open big log. Try to change it or close app while logload process haven't finished.

Diff Detail

Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 5409
Build 5921: arc lint + arc unit
Deepwarrior created this revision.Dec 7 2017, 12:15 PM

Fix mem leak

NikaWhite requested changes to this revision.Dec 7 2017, 10:58 PM
NikaWhite added inline comments.
src/lib/logload.c
818

Should be closed in case if failed to start new thread.

819

Memory leak. Should be freed in case if new thread failed to start.

This revision now requires changes to proceed.Dec 7 2017, 10:58 PM
Deepwarrior requested review of this revision.Dec 8 2017, 3:28 AM
Deepwarrior marked 2 inline comments as done.
Deepwarrior added inline comments.
src/lib/logload.c
818

This memory will be released when new log will be loaded or window will be closed.

819

Same as above.

NikaWhite accepted this revision.Dec 8 2017, 4:47 AM
NikaWhite added inline comments.
src/lib/logload.c
821

Looks useless and weird

This revision is now accepted and ready to land.Dec 8 2017, 4:47 AM
NikaWhite closed this revision.Dec 8 2017, 4:48 AM