From: Lyndon Nerenberg Date: Thu, 10 Apr 2014 11:10:34 +0000 (-0700) Subject: When lkfopendata() fails, seqfile is being freed too soon. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/ef960faf045621c89614286fa3d59aedbb38a5ea When lkfopendata() fails, seqfile is being freed too soon. --- diff --git a/uip/new.c b/uip/new.c index 83b09664..bdbdc73f 100644 --- 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; } }