summaryrefslogtreecommitdiff
path: root/lib/tevent
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-07-20 14:20:03 +0200
committerStefan Metzmacher <metze@samba.org>2017-07-23 10:27:22 +0200
commitce417f5ceec42a70ab651bc3a0dc2ab29cb7efd2 (patch)
tree76ee17157294c4b1d9d8ba63dec9cdaf5047617f /lib/tevent
parent3d87c0660eba61ac4b02e43798aa82ee9e64b454 (diff)
downloadsamba-ce417f5ceec42a70ab651bc3a0dc2ab29cb7efd2.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> (cherry picked from commit ca3e98488a45aa143e4ba454b4ba8763f09a6f50)
Diffstat (limited to 'lib/tevent')
-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);
}