summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/libads/kerberos.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c
index 2dfdc31dd5..90650e1dce 100644
--- a/source3/libads/kerberos.c
+++ b/source3/libads/kerberos.c
@@ -195,6 +195,7 @@ int ads_kinit_password(ADS_STRUCT *ads)
}
if (!ads->auth.password) {
+ SAFE_FREE(s);
return KRB5_LIBOS_CANTREADPWD;
}
@@ -205,7 +206,7 @@ int ads_kinit_password(ADS_STRUCT *ads)
DEBUG(0,("kerberos_kinit_password %s failed: %s\n",
s, error_message(ret)));
}
- free(s);
+ SAFE_FREE(s);
return ret;
}