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:
parent
b76250f1cf
commit
a9b76c9e2d
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user