From 33f936dd18cee4b2359e2966d6f8c1acf34cd8c7 Mon Sep 17 00:00:00 2001 From: Pawan Rawal <pawan0201@gmail.com> Date: Sat, 14 May 2016 13:07:33 +0530 Subject: [PATCH] fixing nil pointer reference bug in server/main.go --- server/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/main.go b/server/main.go index c05c2e6b..3d399e4c 100644 --- a/server/main.go +++ b/server/main.go @@ -209,7 +209,8 @@ type server struct{} // This method is used to execute the query and return the response to the // client as a protocol buffer message. func (s *server) Query(ctx context.Context, - req *graph.Request) (resp *graph.Response, err error) { + req *graph.Request) (*graph.Response, error) { + resp := new(graph.Response) if len(req.Query) == 0 { glog.Error("While reading query") return resp, fmt.Errorf("Empty query") -- GitLab