fix plotter memory leak

Change-Id: Ibc31d50a792068a04a252551bc6238cb45a8ebcb
Reviewed-on: http://review.couchbase.org/25038
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>