1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

For libnet_join error string functions, make sure not to overwrite last status string.

Guenther
This commit is contained in:
Günther Deschner 2008-01-12 02:17:10 +01:00
parent b76250f1cf
commit a9b76c9e2d

View File

@ -30,14 +30,14 @@ static void libnet_join_set_error_string(TALLOC_CTX *mem_ctx,
const char *format, ...) const char *format, ...)
{ {
va_list args; va_list args;
char *tmp = NULL;
if (r->out.error_string) {
return;
}
va_start(args, format); va_start(args, format);
tmp = talloc_vasprintf(mem_ctx, format, args); r->out.error_string = talloc_vasprintf(mem_ctx, format, args);
va_end(args); va_end(args);
TALLOC_FREE(r->out.error_string);
r->out.error_string = tmp;
} }
/**************************************************************** /****************************************************************
@ -48,14 +48,14 @@ static void libnet_unjoin_set_error_string(TALLOC_CTX *mem_ctx,
const char *format, ...) const char *format, ...)
{ {
va_list args; va_list args;
char *tmp = NULL;
if (r->out.error_string) {
return;
}
va_start(args, format); va_start(args, format);
tmp = talloc_vasprintf(mem_ctx, format, args); r->out.error_string = talloc_vasprintf(mem_ctx, format, args);
va_end(args); va_end(args);
TALLOC_FREE(r->out.error_string);
r->out.error_string = tmp;
} }
#ifdef WITH_ADS #ifdef WITH_ADS