use krb5_set_error_message
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23295 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -121,13 +121,13 @@ krb5_initlog(krb5_context context,
|
|||||||
{
|
{
|
||||||
krb5_log_facility *f = calloc(1, sizeof(*f));
|
krb5_log_facility *f = calloc(1, sizeof(*f));
|
||||||
if(f == NULL) {
|
if(f == NULL) {
|
||||||
krb5_set_error_string (context, "malloc: out of memory");
|
krb5_set_error_message(context, ENOMEM, "malloc: out of memory");
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
f->program = strdup(program);
|
f->program = strdup(program);
|
||||||
if(f->program == NULL){
|
if(f->program == NULL){
|
||||||
free(f);
|
free(f);
|
||||||
krb5_set_error_string (context, "malloc: out of memory");
|
krb5_set_error_message(context, ENOMEM, "malloc: out of memory");
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
*fac = f;
|
*fac = f;
|
||||||
@@ -145,7 +145,7 @@ krb5_addlog_func(krb5_context context,
|
|||||||
{
|
{
|
||||||
struct facility *fp = log_realloc(fac);
|
struct facility *fp = log_realloc(fac);
|
||||||
if(fp == NULL) {
|
if(fp == NULL) {
|
||||||
krb5_set_error_string (context, "malloc: out of memory");
|
krb5_set_error_message(context, ENOMEM, "malloc: out of memory");
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
fp->min = min;
|
fp->min = min;
|
||||||
@@ -187,7 +187,7 @@ open_syslog(krb5_context context,
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if(sd == NULL) {
|
if(sd == NULL) {
|
||||||
krb5_set_error_string (context, "malloc: out of memory");
|
krb5_set_error_message(context, ENOMEM, "malloc: out of memory");
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
i = find_value(sev, syslogvals);
|
i = find_value(sev, syslogvals);
|
||||||
@@ -242,7 +242,7 @@ open_file(krb5_context context, krb5_log_facility *fac, int min, int max,
|
|||||||
{
|
{
|
||||||
struct file_data *fd = malloc(sizeof(*fd));
|
struct file_data *fd = malloc(sizeof(*fd));
|
||||||
if(fd == NULL) {
|
if(fd == NULL) {
|
||||||
krb5_set_error_string (context, "malloc: out of memory");
|
krb5_set_error_message(context, ENOMEM, "malloc: out of memory");
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
fd->filename = filename;
|
fd->filename = filename;
|
||||||
@@ -292,7 +292,7 @@ krb5_addlog_dest(krb5_context context, krb5_log_facility *f, const char *orig)
|
|||||||
int keep_open = 0;
|
int keep_open = 0;
|
||||||
fn = strdup(p + 5);
|
fn = strdup(p + 5);
|
||||||
if(fn == NULL) {
|
if(fn == NULL) {
|
||||||
krb5_set_error_string (context, "malloc: out of memory");
|
krb5_set_error_message(context, ENOMEM, "malloc: out of memory");
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
if(p[4] == '='){
|
if(p[4] == '='){
|
||||||
|
Reference in New Issue
Block a user