[PATCH 1/2] Make 'clear_dive()' free the primary dive computer data properly

Rick Walsh rickmwalsh at gmail.com
Thu Jun 9 17:41:31 PDT 2016


On 10 June 2016 at 10:19, Linus Torvalds <torvalds at linux-foundation.org>
wrote:

> Ok, I think I found it.
>
> The dive planner does
>
>     displayed_dive.dc.model = model;
>
> where "model" is a just a pointer to the static string "planned dive".
> Although it can be "manually added dive" too for that case.
>
> That assignment should just do "strdup()" on the passed-in string.
>
> A patch something like the attached fixes it here.  But maybe you're
> seeing a different issue, so please double-check..
>

Your patch works for me.  Thanks for the working out the issue and fixing
it.

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160610/7a6c49e6/attachment.html>


More information about the subsurface mailing list