krb5_free_data

Markus Moeller huaraz at moeller.plus.com
Sat Jun 21 12:56:23 EDT 2014


Hi,

   I wonder if it wouldn't be  better to check if val->data is NULL before 
freeing ?  To me the function makes otherwise no sense as I have to do the 
same checks myself before  I can call the function safely.


void KRB5_CALLCONV
krb5_free_data(krb5_context context, krb5_data *val)
{
    if (val == NULL)
        return;
    free(val->data);
    free(val);
}


Thank you
Markus 




More information about the krbdev mailing list