On Thu, Jun 9, 2016 at 4:19 PM, Rick Walsh <[email protected]> wrote:
>> From: Linus Torvalds <[email protected]>
>> Subject: [PATCH 1/2] Make 'clear_dive()' free the primary dive computer data 
>> properly
>
> This change leads to an invalid pointer error when cancelling a planned
> dive.

Hmm. Running under valgrind shows that MainWindow::setupForAddAndPlan() does a

     clear_dive(&displayed_dive);

and it 's the

     free((void *)dc->model);

in there that causes problems.

You have a slightly different thing, with the call sequence being
copy_dive -> clear_dive. But I suspect the causes are the same:
there's a "struct dive" that hasn't been fully initialized and has a
bogus dc->model in itr.

I'll try to see what I can get, but can you let me know exactly what
your sequence was? I tried opening an empty file, then plan a dive and
cancel it immediately. That didn't fail, but the *second* time I did
it I got the problem.

                Linus
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to