Update for 1.12's removal of krb5_xfree()
This commit is contained in:
parent
f619caa9c9
commit
447ee6c9e6
@ -113,7 +113,7 @@ diff -up /dev/null krb5-1.7/src/lib/krb5/keytab/kt_any.c
|
|||||||
+ if ((data = (krb5_ktany_data *)malloc(sizeof(krb5_ktany_data))) == NULL)
|
+ if ((data = (krb5_ktany_data *)malloc(sizeof(krb5_ktany_data))) == NULL)
|
||||||
+ return(ENOMEM);
|
+ return(ENOMEM);
|
||||||
+ if ((data->name = (char *)malloc(strlen(name) + 1)) == NULL) {
|
+ if ((data->name = (char *)malloc(strlen(name) + 1)) == NULL) {
|
||||||
+ krb5_xfree(data);
|
+ free(data);
|
||||||
+ return(ENOMEM);
|
+ return(ENOMEM);
|
||||||
+ }
|
+ }
|
||||||
+ strcpy(data->name, name);
|
+ strcpy(data->name, name);
|
||||||
@ -124,8 +124,8 @@ diff -up /dev/null krb5-1.7/src/lib/krb5/keytab/kt_any.c
|
|||||||
+ data->nchoices++;
|
+ data->nchoices++;
|
||||||
+ if ((data->choices = (krb5_keytab *)
|
+ if ((data->choices = (krb5_keytab *)
|
||||||
+ malloc(data->nchoices * sizeof(krb5_keytab))) == NULL) {
|
+ malloc(data->nchoices * sizeof(krb5_keytab))) == NULL) {
|
||||||
+ krb5_xfree(data->name);
|
+ free(data->name);
|
||||||
+ krb5_xfree(data);
|
+ free(data);
|
||||||
+ return(ENOMEM);
|
+ return(ENOMEM);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -142,7 +142,7 @@ diff -up /dev/null krb5-1.7/src/lib/krb5/keytab/kt_any.c
|
|||||||
+
|
+
|
||||||
+ /* Try resolving the choice name. */
|
+ /* Try resolving the choice name. */
|
||||||
+ kerror = krb5_kt_resolve(context, copy, &data->choices[i]);
|
+ kerror = krb5_kt_resolve(context, copy, &data->choices[i]);
|
||||||
+ krb5_xfree(copy);
|
+ free(copy);
|
||||||
+ if (kerror) {
|
+ if (kerror) {
|
||||||
+ cleanup(context, data, i);
|
+ cleanup(context, data, i);
|
||||||
+ return(kerror);
|
+ return(kerror);
|
||||||
@ -190,7 +190,7 @@ diff -up /dev/null krb5-1.7/src/lib/krb5/keytab/kt_any.c
|
|||||||
+
|
+
|
||||||
+ cleanup(context, data, data->nchoices);
|
+ cleanup(context, data, data->nchoices);
|
||||||
+ id->ops = 0;
|
+ id->ops = 0;
|
||||||
+ krb5_xfree(id);
|
+ free(id);
|
||||||
+ return(0);
|
+ return(0);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
@ -236,14 +236,14 @@ diff -up /dev/null krb5-1.7/src/lib/krb5/keytab/kt_any.c
|
|||||||
+ &cdata->cursor)) == 0)
|
+ &cdata->cursor)) == 0)
|
||||||
+ break;
|
+ break;
|
||||||
+ else if (kerror != ENOENT) {
|
+ else if (kerror != ENOENT) {
|
||||||
+ krb5_xfree(cdata);
|
+ free(cdata);
|
||||||
+ return(kerror);
|
+ return(kerror);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (i == data->nchoices) {
|
+ if (i == data->nchoices) {
|
||||||
+ /* Everyone returned ENOENT, so no go. */
|
+ /* Everyone returned ENOENT, so no go. */
|
||||||
+ krb5_xfree(cdata);
|
+ free(cdata);
|
||||||
+ return(kerror);
|
+ return(kerror);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -280,7 +280,7 @@ diff -up /dev/null krb5-1.7/src/lib/krb5/keytab/kt_any.c
|
|||||||
+
|
+
|
||||||
+ choice_id = data->choices[cdata->which];
|
+ choice_id = data->choices[cdata->which];
|
||||||
+ kerror = krb5_kt_end_seq_get(context, choice_id, &cdata->cursor);
|
+ kerror = krb5_kt_end_seq_get(context, choice_id, &cdata->cursor);
|
||||||
+ krb5_xfree(cdata);
|
+ free(cdata);
|
||||||
+ return(kerror);
|
+ return(kerror);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
@ -292,11 +292,11 @@ diff -up /dev/null krb5-1.7/src/lib/krb5/keytab/kt_any.c
|
|||||||
+{
|
+{
|
||||||
+ int i;
|
+ int i;
|
||||||
+
|
+
|
||||||
+ krb5_xfree(data->name);
|
+ free(data->name);
|
||||||
+ for (i = 0; i < nchoices; i++)
|
+ for (i = 0; i < nchoices; i++)
|
||||||
+ krb5_kt_close(context, data->choices[i]);
|
+ krb5_kt_close(context, data->choices[i]);
|
||||||
+ krb5_xfree(data->choices);
|
+ free(data->choices);
|
||||||
+ krb5_xfree(data);
|
+ free(data);
|
||||||
+}
|
+}
|
||||||
diff -up krb5-1.7/src/lib/krb5/keytab/ktbase.c krb5-1.7/src/lib/krb5/keytab/ktbase.c
|
diff -up krb5-1.7/src/lib/krb5/keytab/ktbase.c krb5-1.7/src/lib/krb5/keytab/ktbase.c
|
||||||
--- krb5-1.7/src/lib/krb5/keytab/ktbase.c 2009-02-18 13:18:56.000000000 -0500
|
--- krb5-1.7/src/lib/krb5/keytab/ktbase.c 2009-02-18 13:18:56.000000000 -0500
|
@ -75,7 +75,7 @@ Source100: nss_wrapper-0.0-20130719153839Z.git6cb59864.bz2
|
|||||||
Source101: noport.c
|
Source101: noport.c
|
||||||
|
|
||||||
Patch6: krb5-1.12-ksu-path.patch
|
Patch6: krb5-1.12-ksu-path.patch
|
||||||
Patch12: krb5-1.7-ktany.patch
|
Patch12: krb5-1.12-ktany.patch
|
||||||
Patch16: krb5-1.12-buildconf.patch
|
Patch16: krb5-1.12-buildconf.patch
|
||||||
Patch23: krb5-1.3.1-dns.patch
|
Patch23: krb5-1.3.1-dns.patch
|
||||||
Patch29: krb5-1.10-kprop-mktemp.patch
|
Patch29: krb5-1.10-kprop-mktemp.patch
|
||||||
|
Loading…
Reference in New Issue
Block a user