From 4e9123a0b14cc857802fbcac220a7b397b03ef15 Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Sun, 6 Apr 2014 17:54:55 +0200 Subject: [PATCH] Fixed another dirname/basename refactoring bug. file was freed before use. --- src/libpts/plugins/imv_attestation/attest.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libpts/plugins/imv_attestation/attest.c b/src/libpts/plugins/imv_attestation/attest.c index b8a6854cb..8f4df39e7 100644 --- a/src/libpts/plugins/imv_attestation/attest.c +++ b/src/libpts/plugins/imv_attestation/attest.c @@ -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':