summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-07-20 14:20:03 +0200
committerRalph Boehme <slow@samba.org>2017-07-21 23:31:03 +0200
commitca3e98488a45aa143e4ba454b4ba8763f09a6f50 (patch)
treedc3c958f556197c1a5baae7374da0dad76528a28
parent21b56ffd983cc0b982bea55866bfa84c79133503 (diff)
downloadsamba-ca3e98488a45aa143e4ba454b4ba8763f09a6f50.tar.gz
tevent: handle passing req = NULL to tevent_req_print()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
-rw-r--r--lib/tevent/tevent_req.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/tevent/tevent_req.c b/lib/tevent/tevent_req.c
index 155746ed6f3..15754d361ae 100644
--- a/lib/tevent/tevent_req.c
+++ b/lib/tevent/tevent_req.c
@@ -45,6 +45,10 @@ char *tevent_req_default_print(struct tevent_req *req, TALLOC_CTX *mem_ctx)
char *tevent_req_print(TALLOC_CTX *mem_ctx, struct tevent_req *req)
{
+ if (req == NULL) {
+ return talloc_strdup(mem_ctx, "tevent_req[NULL]");
+ }
+
if (!req->private_print) {
return tevent_req_default_print(req, mem_ctx);
}