aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennard Sprong <x-sheep@users.noreply.github.com>2018-06-14 21:45:26 +0200
committerSimon Tatham <anakin@pobox.com>2018-06-14 23:39:49 +0100
commit506b07352ae225c74e79f6c6e7872bc2005bdb53 (patch)
tree51664775cf2e6b95b200c36cddd477ff65b2681d
parent5a697b3df94cec314fba99a3bf1e0de69fe88c09 (diff)
downloadpuzzles-506b07352ae225c74e79f6c6e7872bc2005bdb53.zip
puzzles-506b07352ae225c74e79f6c6e7872bc2005bdb53.tar.gz
puzzles-506b07352ae225c74e79f6c6e7872bc2005bdb53.tar.bz2
puzzles-506b07352ae225c74e79f6c6e7872bc2005bdb53.tar.xz
misc.c: Fix implementation of free_keys.
The previous version attempted to free the first element multiple times.
-rw-r--r--misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index 734ca5d..73faf3a 100644
--- 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);
}