From 05cb15d63c8dada1c3c4707376e3b9bd727954bf Mon Sep 17 00:00:00 2001 From: Zachary Wasserman Date: Mon, 17 Oct 2016 13:11:23 -0400 Subject: [PATCH] Fix pointer handling in inmem nextID (#323) --- server/datastore/inmem.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/datastore/inmem.go b/server/datastore/inmem.go index 891378f8d5..97d0888dc8 100644 --- a/server/datastore/inmem.go +++ b/server/datastore/inmem.go @@ -90,7 +90,7 @@ func sortResults(slice interface{}, opt kolide.ListOptions, fields map[string]st // nextID returns the next ID value that should be used for a struct of the // given type func (orm *inmem) nextID(val interface{}) uint { - valType := reflect.TypeOf(val) + valType := reflect.TypeOf(reflect.Indirect(reflect.ValueOf(val)).Interface()) orm.nextIDs[valType]++ return orm.nextIDs[valType] }