summaryrefslogtreecommitdiff
path: root/client/bankid.c
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@slbdata.se>2011-01-14 09:42:59 +0100
committerSamuel Lidén Borell <samuel@slbdata.se>2011-01-14 09:42:59 +0100
commita772fd3e2827f4a0eca3068e6e00be823563e541 (patch)
treec3c05f48af0c5099111c49b7959481a423ab1f1c /client/bankid.c
parente34a9417bee9c1f829b92f518754c7484bd211d0 (diff)
downloadfribid-a772fd3e2827f4a0eca3068e6e00be823563e541.tar.gz
fribid-a772fd3e2827f4a0eca3068e6e00be823563e541.tar.bz2
fribid-a772fd3e2827f4a0eca3068e6e00be823563e541.zip
Free the request on error in bankid.c
Diffstat (limited to 'client/bankid.c')
-rw-r--r--client/bankid.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/client/bankid.c b/client/bankid.c
index bd06c02..14903b7 100644
--- a/client/bankid.c
+++ b/client/bankid.c
@@ -355,7 +355,10 @@ BankIDError bankid_createRequest(const RegutilInfo *params,
size_t brlen;
TokenError error = backend_createRequest(params, password,
&binaryRequest, &brlen);
- if (error) return BIDERR_InternalError;
+ if (error) {
+ free(binaryRequest);
+ return BIDERR_InternalError;
+ }
// Encode with Base64
*request = base64_encode(binaryRequest, brlen);