File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,8 @@ class HitSink {
174174 nthreads_((nthreads > 0 ) ? nthreads : 1),
175175 ptBufs_(),
176176 ptCounts_(nthreads_),
177- perThreadBufSize_(perThreadBufSize)
177+ perThreadBufSize_(perThreadBufSize),
178+ ptNumAligned_(NULL )
178179 {
179180 size_t nelt = 5 * nthreads_;
180181 ptNumAligned_ = new uint64_t [nelt];
@@ -218,7 +219,8 @@ class HitSink {
218219 sampleMax_(sampleMax),
219220 quiet_(false ),
220221 nthreads_(0 ),
221- perThreadBufSize_(0 )
222+ perThreadBufSize_(0 ),
223+ ptNumAligned_(NULL )
222224 {
223225 // Open all files for writing and initialize all locks
224226 for (size_t i = 0 ; i < numOuts; i++) {
@@ -232,8 +234,10 @@ class HitSink {
232234 * Destroy HitSinkobject;
233235 */
234236 virtual ~HitSink () {
235- delete ptNumAligned_;
236- ptNumAligned_ = NULL ;
237+ if (ptNumAligned_ != NULL ) {
238+ delete ptNumAligned_;
239+ ptNumAligned_ = NULL ;
240+ }
237241 closeOuts ();
238242 if (_deleteOuts) {
239243 // Delete all non-NULL output streams
You can’t perform that action at this time.
0 commit comments