mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
dsdb: Fix CID 1473454: Null pointer dereferences
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
84be21565c
commit
e0426187eb
@ -313,8 +313,14 @@ static int rootdse_add_dynamic(struct rootdse_context *ac, struct ldb_message *m
|
||||
}
|
||||
|
||||
if (do_attribute(attrs, "currentTime")) {
|
||||
if (ldb_msg_add_steal_string(msg, "currentTime",
|
||||
ldb_timestring(msg, time(NULL))) != LDB_SUCCESS) {
|
||||
char *timestr = ldb_timestring(msg, time(NULL));
|
||||
|
||||
if (timestr == NULL) {
|
||||
goto failed;
|
||||
}
|
||||
|
||||
if (ldb_msg_add_steal_string(
|
||||
msg, "currentTime", timestr) != LDB_SUCCESS) {
|
||||
goto failed;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user