From 447ee6c9e6ac41778caeebc83906455c668eba91 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Tue, 15 Oct 2013 17:49:54 -0400 Subject: [PATCH] Update for 1.12's removal of krb5_xfree() --- krb5-1.7-ktany.patch => krb5-1.12-ktany.patch | 22 +++++++++---------- krb5.spec | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) rename krb5-1.7-ktany.patch => krb5-1.12-ktany.patch (97%) diff --git a/krb5-1.7-ktany.patch b/krb5-1.12-ktany.patch similarity index 97% rename from krb5-1.7-ktany.patch rename to krb5-1.12-ktany.patch index 902f328..88f1a7e 100644 --- a/krb5-1.7-ktany.patch +++ b/krb5-1.12-ktany.patch @@ -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) + return(ENOMEM); + if ((data->name = (char *)malloc(strlen(name) + 1)) == NULL) { -+ krb5_xfree(data); ++ free(data); + return(ENOMEM); + } + strcpy(data->name, name); @@ -124,8 +124,8 @@ diff -up /dev/null krb5-1.7/src/lib/krb5/keytab/kt_any.c + data->nchoices++; + if ((data->choices = (krb5_keytab *) + malloc(data->nchoices * sizeof(krb5_keytab))) == NULL) { -+ krb5_xfree(data->name); -+ krb5_xfree(data); ++ free(data->name); ++ free(data); + 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. */ + kerror = krb5_kt_resolve(context, copy, &data->choices[i]); -+ krb5_xfree(copy); ++ free(copy); + if (kerror) { + cleanup(context, data, i); + 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); + id->ops = 0; -+ krb5_xfree(id); ++ free(id); + return(0); +} + @@ -236,14 +236,14 @@ diff -up /dev/null krb5-1.7/src/lib/krb5/keytab/kt_any.c + &cdata->cursor)) == 0) + break; + else if (kerror != ENOENT) { -+ krb5_xfree(cdata); ++ free(cdata); + return(kerror); + } + } + + if (i == data->nchoices) { + /* Everyone returned ENOENT, so no go. */ -+ krb5_xfree(cdata); ++ free(cdata); + 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]; + kerror = krb5_kt_end_seq_get(context, choice_id, &cdata->cursor); -+ krb5_xfree(cdata); ++ free(cdata); + return(kerror); +} + @@ -292,11 +292,11 @@ diff -up /dev/null krb5-1.7/src/lib/krb5/keytab/kt_any.c +{ + int i; + -+ krb5_xfree(data->name); ++ free(data->name); + for (i = 0; i < nchoices; i++) + krb5_kt_close(context, data->choices[i]); -+ krb5_xfree(data->choices); -+ krb5_xfree(data); ++ free(data->choices); ++ free(data); +} 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 diff --git a/krb5.spec b/krb5.spec index d4eb3f7..a66aa43 100644 --- a/krb5.spec +++ b/krb5.spec @@ -75,7 +75,7 @@ Source100: nss_wrapper-0.0-20130719153839Z.git6cb59864.bz2 Source101: noport.c 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 Patch23: krb5-1.3.1-dns.patch Patch29: krb5-1.10-kprop-mktemp.patch