summaryrefslogtreecommitdiff
path: root/tests/t-rsa-pss.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/t-rsa-pss.c')
-rw-r--r--tests/t-rsa-pss.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/t-rsa-pss.c b/tests/t-rsa-pss.c
index fa8392e9..c5f90116 100644
--- a/tests/t-rsa-pss.c
+++ b/tests/t-rsa-pss.c
@@ -144,7 +144,10 @@ hex2buffer (const char *string, size_t *r_length)
for (s=string; *s; s +=2 )
{
if (!hexdigitp (s) || !hexdigitp (s+1))
- return NULL; /* Invalid hex digits. */
+ {
+ xfree (buffer);
+ return NULL; /* Invalid hex digits. */
+ }
((unsigned char*)buffer)[length++] = xtoi_2 (s);
}
*r_length = length;