]> git.sommitrealweird.co.uk Git - onak.git/blobdiff - merge.c
cscvs to tla changeset 54
[onak.git] / merge.c
diff --git a/merge.c b/merge.c
index cfe2d97d1c2711bfbb74d79eeba4b2d37f498c0f..7f1773eca706e8d0cfa4b7def3c83e54e78a24c3 100644 (file)
--- a/merge.c
+++ b/merge.c
@@ -10,9 +10,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "decodekey.h"
 #include "keydb.h"
 #include "keyid.h"
-#include "keyindex.h"
 #include "keystructs.h"
 #include "ll.h"
 #include "mem.h"
@@ -394,9 +394,9 @@ int update_keys(struct openpgp_publickey **keys, bool verbose)
                                        *keys = curkey->next;
                                } else {
                                        prev->next = curkey->next;
-                                       prev = curkey->next;
                                        curkey->next = NULL;
                                        free_publickey(curkey);
+                                       curkey = prev;
                                }
                        } else {
                                prev = curkey;