summaryrefslogtreecommitdiffstats
path: root/source4/lib/messaging/messaging.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/messaging/messaging.c')
-rw-r--r--source4/lib/messaging/messaging.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index ffa668a445..a67a58a6e0 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -136,15 +136,10 @@ static NTSTATUS irpc_uptime(struct irpc_message *msg,
*/
static char *imessaging_path(struct imessaging_context *msg, struct server_id server_id)
{
- TALLOC_CTX *tmp_ctx = talloc_new(msg);
- const char *id = server_id_str(tmp_ctx, &server_id);
- char *s;
- if (id == NULL) {
- return NULL;
- }
- s = talloc_asprintf(msg, "%s/msg.%s", msg->base_path, id);
- talloc_steal(s, tmp_ctx);
- return s;
+ struct server_id_buf buf;
+
+ return talloc_asprintf(msg, "%s/msg.%s", msg->base_path,
+ server_id_str_buf(server_id, &buf));
}
/*