add some more error strings
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10338 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -50,6 +50,7 @@ hdb_principal2key(krb5_context context, krb5_principal p, krb5_data *key)
|
||||
len = length_Principal(&new);
|
||||
buf = malloc(len);
|
||||
if(buf == NULL){
|
||||
krb5_set_error_string(context, "malloc: out of memory");
|
||||
ret = ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
@@ -80,8 +81,10 @@ hdb_entry2value(krb5_context context, hdb_entry *ent, krb5_data *value)
|
||||
|
||||
len = length_hdb_entry(ent);
|
||||
buf = malloc(len);
|
||||
if(buf == NULL)
|
||||
if(buf == NULL) {
|
||||
krb5_set_error_string(context, "malloc: out of memory");
|
||||
return ENOMEM;
|
||||
}
|
||||
ret = encode_hdb_entry(buf + len - 1, len, ent, &len);
|
||||
if(ret){
|
||||
free(buf);
|
||||
@@ -128,8 +131,10 @@ _hdb_store(krb5_context context, HDB *db, unsigned flags, hdb_entry *entry)
|
||||
if(entry->generation == NULL) {
|
||||
struct timeval t;
|
||||
entry->generation = malloc(sizeof(*entry->generation));
|
||||
if(entry->generation == NULL)
|
||||
if(entry->generation == NULL) {
|
||||
krb5_set_error_string(context, "malloc: out of memory");
|
||||
return ENOMEM;
|
||||
}
|
||||
gettimeofday(&t, NULL);
|
||||
entry->generation->time = t.tv_sec;
|
||||
entry->generation->usec = t.tv_usec;
|
||||
|
Reference in New Issue
Block a user