Fix srenew/sfree_aligned misuse in PME
authorRoland Schulz <roland@utk.edu>
Fri, 27 Apr 2012 18:36:56 +0000 (14:36 -0400)
committerRoland Schulz <roland@utk.edu>
Sat, 28 Apr 2012 13:49:40 +0000 (09:49 -0400)
denom was first allocated with srenew and then freed with
sfree_aligned. This is illegal and crashes on Windows.

Change-Id: I83d8c35973ed0be1bb23396d6b97bf1d4b0f5f06

src/mdlib/pme.c

index 7a0dad69566e837c96448d7d999e80ed0ddb0fcb..1337a0511cfe907d74ed9db8c5f4309b01d8f182 100644 (file)
@@ -1780,7 +1780,6 @@ static void realloc_work(pme_work_t *work,int nkx)
         srenew(work->mhy  ,work->nalloc);
         srenew(work->mhz  ,work->nalloc);
         srenew(work->m2   ,work->nalloc);
-        srenew(work->denom,work->nalloc);
         /* Allocate an aligned pointer for SSE operations, including 3 extra
          * elements at the end since SSE operates on 4 elements at a time.
          */