syncbase: Fix memory leak in runRemoteOp.

The runRemoteOp function takes a context and creates a child context.
If the rpc operation is successful, the child context is not cancelled,
and the caller is implicity required to cancel the parent.

In the clock code path, the context passed to runRemoteOp is never
cancelled, and so the child contexts accumulate.

This CL makes the clock create a new context with cancel, and cancels it
in a defer.

Change-Id: I853cb4eb4bd9de35e7be6f15c75cd0940fbfc24c
2 files changed
tree: a44cf68b83b88fba2a2127a936d5c0bdd9f10b45
  1. cmd/
  2. examples/
  3. internal/
  4. lib/
  5. runtime/
  6. services/
  7. test/
  8. .gitignore
  9. AUTHORS
  10. CONTRIBUTING.md
  11. CONTRIBUTORS
  12. envvar.go
  13. envvar_test.go
  14. LICENSE
  15. PATENTS
  16. README.md
  17. VERSION
README.md

Vanadium

This repository contains a reference implementation of the Vanadium APIs.

Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.