summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/dcerpc_error.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc/rpc/dcerpc_error.c')
-rw-r--r--source4/librpc/rpc/dcerpc_error.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/source4/librpc/rpc/dcerpc_error.c b/source4/librpc/rpc/dcerpc_error.c
index d1456cad72..c9434060a1 100644
--- a/source4/librpc/rpc/dcerpc_error.c
+++ b/source4/librpc/rpc/dcerpc_error.c
@@ -40,10 +40,8 @@ static const struct dcerpc_fault_table dcerpc_faults[] =
{ NULL, 0}
};
-const char *dcerpc_errstr(uint32_t fault_code)
+const char *dcerpc_errstr(TALLOC_CTX *mem_ctx, uint32_t fault_code)
{
- /* TODO: remove static pstring! */
- static pstring msg;
int idx = 0;
while (dcerpc_faults[idx].errstr != NULL) {
@@ -53,7 +51,5 @@ const char *dcerpc_errstr(uint32_t fault_code)
idx++;
}
- slprintf(msg, sizeof(msg), "DCERPC fault 0x%08x", fault_code);
-
- return msg;
+ return talloc_asprintf(mem_ctx, "DCERPC fault 0x%08x", fault_code);
}