]> diplodocus.org Git - nmh/commitdiff
When lkfopendata() fails, seqfile is being freed too soon.
authorLyndon Nerenberg <lyndon@orthanc.ca>
Thu, 10 Apr 2014 11:10:34 +0000 (04:10 -0700)
committerLyndon Nerenberg <lyndon@orthanc.ca>
Thu, 10 Apr 2014 11:10:34 +0000 (04:10 -0700)
uip/new.c

index 83b0966..bdbdc73 100644 (file)
--- a/uip/new.c
+++ b/uip/new.c
@@ -114,11 +114,11 @@ get_msgnums(char *folder, char *sequences[])
        return NULL;
 
     if ((fp = lkfopendata (seqfile, "r", & failed_to_lock)) == NULL) {
-       free(seqfile);
 
        if (failed_to_lock) {
            adios (seqfile, "failed to lock");
        } else {
+           free(seqfile);
            return NULL;
        }
     }