diff options
author | Romain Francoise <rfrancoise@debian.org> | 2014-04-15 19:34:32 +0200 |
---|---|---|
committer | Romain Francoise <rfrancoise@debian.org> | 2014-04-15 19:34:32 +0200 |
commit | c5ebfc7b9c16551fe825dc1d79c3f7e2f096f6c9 (patch) | |
tree | d4e2118cbd411caa1a0528eac831030109bc6e65 /src/libpts/pts/pts.c | |
parent | 15fb7904f4431a6e7c305fd08732458f7f885e7e (diff) | |
download | vyos-strongswan-c5ebfc7b9c16551fe825dc1d79c3f7e2f096f6c9.tar.gz vyos-strongswan-c5ebfc7b9c16551fe825dc1d79c3f7e2f096f6c9.zip |
Import upstream version 5.1.3
Diffstat (limited to 'src/libpts/pts/pts.c')
-rw-r--r-- | src/libpts/pts/pts.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libpts/pts/pts.c b/src/libpts/pts/pts.c index 8699282f0..3ab9b92e6 100644 --- a/src/libpts/pts/pts.c +++ b/src/libpts/pts/pts.c @@ -393,7 +393,7 @@ static void load_aik_blob(private_pts_t *this) fseek(fp, 0L, SEEK_SET); this->aik_blob = chunk_alloc(aikBlobLen); - if (fread(this->aik_blob.ptr, 1, aikBlobLen, fp)) + if (fread(this->aik_blob.ptr, 1, aikBlobLen, fp) == aikBlobLen) { DBG2(DBG_PTS, "loaded AIK Blob from '%s'", blob_path); DBG3(DBG_PTS, "AIK Blob: %B", &this->aik_blob); @@ -401,6 +401,7 @@ static void load_aik_blob(private_pts_t *this) else { DBG1(DBG_PTS, "unable to read AIK Blob file '%s'", blob_path); + chunk_free(&this->aik_blob); } fclose(fp); return; |