summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/events.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/lib/events.c b/source3/lib/events.c
index 9e81a47796..f875e0dc0c 100644
--- a/source3/lib/events.c
+++ b/source3/lib/events.c
@@ -286,8 +286,9 @@ static void s3_event_debug(void *context, enum tevent_debug_level level,
break;
};
- vasprintf(&s, fmt, ap);
- if (!s) return;
+ if (vasprintf(&s, fmt, ap) == -1) {
+ return;
+ }
DEBUG(samba_level, ("s3_event: %s", s));
free(s);
}