chiark
/
gitweb
/
~ian
/
sgt-puzzles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a697b3
)
misc.c: Fix implementation of free_keys.
author
Lennard Sprong
<x-sheep@users.noreply.github.com>
Thu, 14 Jun 2018 19:45:26 +0000
(21:45 +0200)
committer
Simon Tatham
<anakin@pobox.com>
Thu, 14 Jun 2018 22:39:49 +0000
(23:39 +0100)
The previous version attempted to free the first element multiple times.
misc.c
patch
|
blob
|
history
diff --git
a/misc.c
b/misc.c
index 734ca5dc2d6577806e0b66c14c8462aafd3b9f01..73faf3ace7a96fcde2b3fca0707501b42b507a77 100644
(file)
--- a/
misc.c
+++ b/
misc.c
@@
-26,7
+26,7
@@
void free_keys(key_label *keys, int nkeys)
int i;
for(i = 0; i < nkeys; i++)
- sfree(keys
->
label);
+ sfree(keys
[i].
label);
sfree(keys);
}