From 01e848387ac85e6bc013dc233c20a01e7ea127c7 Mon Sep 17 00:00:00 2001
From: Axel Kohlmeyer <akohlmey@gmail.com>
Date: Wed, 12 Jul 2017 18:00:38 -0400
Subject: [PATCH] avoid accessing uninitialized data when exiting LAMMPS early

---
 src/comm_brick.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/comm_brick.cpp b/src/comm_brick.cpp
index d6cbed40af..3c972b8244 100644
--- a/src/comm_brick.cpp
+++ b/src/comm_brick.cpp
@@ -124,6 +124,7 @@ void CommBrick::init_buffers()
   maxrecv = BUFMIN;
   memory->create(buf_recv,maxrecv,"comm:buf_recv");
 
+  nswap = 0;
   maxswap = 6;
   allocate_swap(maxswap);
 
-- 
GitLab