mirror of https://github.com/tailscale/tailscale/
syncs: allocate map with Map.WithLock (#13755)
One primary purpose of WithLock is to mutate the underlying map. However, this can lead to a panic if it happens to be nil. Thus, always allocate a map before passing it to f. Updates tailscale/corp#11038 Signed-off-by: Joe Tsai <joetsai@digital-static.net>pull/13763/head
parent
c763b7a7db
commit
5b7303817e
Loading…
Reference in New Issue