]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Use calloc, not k5calloc in ldap back end
authorTom Yu <tlyu@mit.edu>
Fri, 20 Feb 2015 16:43:33 +0000 (11:43 -0500)
committerTom Yu <tlyu@mit.edu>
Fri, 20 Feb 2015 16:52:34 +0000 (11:52 -0500)
The changes cherry picked in 0149ee13d51b48d77fbbaa5c1109036332a5577c
rely on k5calloc(), which is not present in the 1.11 branch.
Compensate by using calloc() instead.

ticket: 8102
version_fixed: 1.11.6
status: resolved

src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c

index 56404e31c8d13dc99832073f896cf2c3647dd512..cb303fdb24f8709d440d038c80ea35b9bd125625 100644 (file)
@@ -422,9 +422,11 @@ krb5_encode_krbsecretkey(krb5_key_data *key_data_in, int n_key_data,
         return NULL;
 
     /* Make a shallow copy of the key data so we can alter it. */
-    key_data = k5calloc(n_key_data, sizeof(*key_data), &err);
-    if (key_data_in == NULL)
+    key_data = calloc(n_key_data, sizeof(*key_data));
+    if (key_data_in == NULL) {
+        err = ENOMEM;
         goto cleanup;
+    }
     memcpy(key_data, key_data_in, n_key_data * sizeof(*key_data));
 
     /* Unpatched krb5 1.11 and 1.12 cannot decode KrbKey sequences with no salt