From 7ee11b48c5e29a3b8859d2e17538c3424c522f05 Mon Sep 17 00:00:00 2001 From: Sebastian Zagrodzki Date: Thu, 27 Apr 2017 03:01:35 +0200 Subject: [PATCH] Close the Context --- usb/usb_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/usb/usb_test.go b/usb/usb_test.go index d121a25..60a66bd 100644 --- a/usb/usb_test.go +++ b/usb/usb_test.go @@ -70,6 +70,7 @@ func TestOpenDeviceWithVidPid(t *testing.T) { {0x9999, 0x0002, false}, } { c := NewContext() + defer c.Close() dev, err := c.OpenDeviceWithVidPid(d.vid, d.pid) if (dev != nil) != d.exists { t.Errorf("OpenDeviceWithVidPid(%s/%s): device != nil is %v, want %v", ID(d.vid), ID(d.pid), dev != nil, d.exists)