projects
/
strong_simulation_stabilizer_rank.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2bcc6f0
)
fixed free() pointer error that was throwing segfaults on newer systems
author
Lucas K
<lkocia@s3miclassical.com>
Wed, 23 Dec 2020 18:28:08 +0000
(10:28 -0800)
committer
Lucas K
<lkocia@s3miclassical.com>
Wed, 23 Dec 2020 18:28:08 +0000
(10:28 -0800)
exponentialsum.c
patch
|
blob
|
history
diff --git
a/exponentialsum.c
b/exponentialsum.c
index 0e0bd6e8cd890ec0ade0f6496abef63872405725..cbf58d9592229fe629923e48c48a4f4c1883760f 100644
(file)
--- a/
exponentialsum.c
+++ b/
exponentialsum.c
@@
-251,8
+251,9
@@
complex double exponentialsum(int *k, int *Q, int *D, int **J) {
setWalker = setE; // 'a'=setE->data
while(setWalker != NULL) {
if(setWalker->next->data == setK->data) {
-
free(setWalker->next)
;
+
setWalker2 = setWalker->next
;
setWalker->next = setWalker->next->next; // delete 'b'
+ free(setWalker2);
break;
}
setWalker = setWalker->next;