From: Andreas Steffen Date: Sun, 6 Apr 2014 15:54:55 +0000 (+0200) Subject: Fixed another dirname/basename refactoring bug. X-Git-Tag: 5.1.3~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4e9123a0b14cc857802fbcac220a7b397b03ef15;p=thirdparty%2Fstrongswan.git Fixed another dirname/basename refactoring bug. file was freed before use. --- diff --git a/src/libpts/plugins/imv_attestation/attest.c b/src/libpts/plugins/imv_attestation/attest.c index b8a6854cb4..8f4df39e7c 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':