More idiomatic as:

    defer l.Unlock()

Before the delete?