1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

r14088: Fix Coverity bug #20. Don't deref possible null.

Jeremy.
This commit is contained in:
Jeremy Allison 2006-03-09 19:03:31 +00:00 committed by Gerald (Jerry) Carter
parent 88dd4ab481
commit 7f3ace5481

View File

@ -177,14 +177,17 @@ BOOL secrets_fetch_domain_guid(const char *domain, struct uuid *guid)
strupper_m(key);
dyn_guid = (struct uuid *)secrets_fetch(key, &size);
if ((!dyn_guid) && (lp_server_role() == ROLE_DOMAIN_PDC)) {
if (!dyn_guid) {
if (lp_server_role() == ROLE_DOMAIN_PDC) {
smb_uuid_generate_random(&new_guid);
if (!secrets_store_domain_guid(domain, &new_guid))
return False;
dyn_guid = (struct uuid *)secrets_fetch(key, &size);
if (dyn_guid == NULL)
}
if (dyn_guid == NULL) {
return False;
}
}
if (size != sizeof(struct uuid)) {
DEBUG(1,("UUID size %d is wrong!\n", (int)size));