From 88748c7b290d13b288055f5dea4d1c49d44db06d Mon Sep 17 00:00:00 2001 From: Krishnanand Thommandra Date: Mon, 17 Jul 2017 13:41:39 +0530 Subject: [PATCH] avoid SIGSEGV by not tracing unless query is trace enabled (#940) * don't trace unless query is trace enabled When 'nodetool settraceprobability' is used, it's possible to get a response with trace information even though client did not specifically mark the query for tracing. * added myself as an author --- AUTHORS | 1 + conn.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index f89ec243a..138a5ee64 100644 --- a/AUTHORS +++ b/AUTHORS @@ -90,3 +90,4 @@ Leigh McCulloch Ron Kuris Raphael Gavache Yasser Abdolmaleki +Krishnanand Thommandra diff --git a/conn.go b/conn.go index 7a3165158..4819d9b34 100644 --- a/conn.go +++ b/conn.go @@ -845,7 +845,7 @@ func (c *Conn) executeQuery(qry *Query) *Iter { return &Iter{err: err} } - if len(framer.traceID) > 0 { + if len(framer.traceID) > 0 && qry.trace != nil { qry.trace.Trace(framer.traceID) }