summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/krb5/krb/rd_rep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/krb5/krb/rd_rep.c b/src/lib/krb5/krb/rd_rep.c
index fe6c76375..1e3c14526 100644
--- a/src/lib/krb5/krb/rd_rep.c
+++ b/src/lib/krb5/krb/rd_rep.c
@@ -145,10 +145,11 @@ krb5_rd_rep(krb5_context context, krb5_auth_context auth_context,
enc = NULL;
clean_scratch:
- memset(scratch.data, 0, scratch.length);
+ if (scratch.data)
+ memset(scratch.data, 0, scratch.length);
+ free(scratch.data);
krb5_free_ap_rep(context, reply);
krb5_free_ap_rep_enc_part(context, enc);
- free(scratch.data);
return retval;
}