Commit 3067a414fc09afeaf5b21d123427bf3b1d6865d1

nelisky 2012-04-13T01:37:26

leak fix

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/libztex.c b/libztex.c
index e8f3219..6ed61fc 100644
--- a/libztex.c
+++ b/libztex.c
@@ -408,7 +408,7 @@ int libztex_scanDevices (struct libztex_dev_list*** devs_p) {
     devs[pos]->dev = ztex;
     devs[pos]->next = NULL;
     if (pos > 0) {
-      devs[pos]->next = devs[pos];
+      devs[pos-1]->next = devs[pos];
     }
     pos++;
   }