Merge lp://qastaging/~mvo/snappy/snappy-panic-less into lp://qastaging/~snappy-dev/snappy/snappy-moved-to-github

Proposed by Michael Vogt
Status: Needs review
Proposed branch: lp://qastaging/~mvo/snappy/snappy-panic-less
Merge into: lp://qastaging/~snappy-dev/snappy/snappy-moved-to-github
Diff against target: 38 lines (+9/-4)
2 files modified
priv/priv.go (+0/-3)
priv/priv_test.go (+9/-1)
To merge this branch: bzr merge lp://qastaging/~mvo/snappy/snappy-panic-less
Reviewer Review Type Date Requested Status
John Lenton (community) Approve
Review via email: mp+275280@code.qastaging.launchpad.net

Description of the change

Tiny branch that fixes a panic when doing:
"""
priv := New(lockfile)
priv.Lock()
priv.Unlock()
priv.Lock()
"""

Kudos to John Lenton for discovering this isssue.

To post a comment you must log in.
Revision history for this message
John Lenton (chipaca) wrote :

Hah.

I didn't do this myself because I didn't understand why it was being nil'ed, so left it alone.

That it can be removed entirely is good news :)

review: Approve
Revision history for this message
Michael Vogt (mvo) wrote :

On Thu, Oct 22, 2015 at 09:38:50AM -0000, John Lenton wrote:
> Review: Approve
>
> Hah.
>
> I didn't do this myself because I didn't understand why it was being nil'ed, so left it alone.
>
> That it can be removed entirely is good news :)

I don't know either (I didn't write the code), but looking at the code
I don't think its required (famous last words) so lets fix it and see
what breaks.

Thanks,
 Michael

Unmerged revisions

794. By Michael Vogt

do not panic if a priv.Mutex is taken/released/taken again

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches