Fixed another dirname/basename refactoring bug.
authorAndreas Steffen <andreas.steffen@strongswan.org>
Sun, 6 Apr 2014 15:54:55 +0000 (17:54 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 7 Apr 2014 10:07:00 +0000 (12:07 +0200)
file was freed before use.

src/libpts/plugins/imv_attestation/attest.c

index b8a6854..8f4df39 100644 (file)
@@ -278,12 +278,14 @@ static void do_args(int argc, char *argv[])
                                                exit(EXIT_FAILURE);
                                        }
                                }
-                               free(file);
                                free(dir);
+
                                if (!attest->set_file(attest, file, op == OP_ADD))
                                {
+                                       free(file);
                                        exit(EXIT_FAILURE);
                                }
+                               free(file);
                                continue;
                        }
                        case 'G':