diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c index 6374946244e..0a2f62d703b 100644 --- a/source4/libnet/libnet_vampire.c +++ b/source4/libnet/libnet_vampire.c @@ -554,7 +554,12 @@ WERROR libnet_vampire_cb_schema_chunk(void *private_data, s->schema_part.last_object->next_object = talloc_steal(s->schema_part.last_object, first_object); } - for (cur = first_object; cur->next_object; cur = cur->next_object) {} + if (first_object != NULL) { + for (cur = first_object; cur->next_object; cur = cur->next_object) {} + } else { + cur = first_object; + } + s->schema_part.last_object = cur; if (!c->partition->more_data) {