Ignore:
Timestamp:
Nov 12, 2012, 7:37:04 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.5: update branche to 3.5.19

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.5.x/source3/libaddns/dnsmarshall.c

    r414 r739  
    2828        struct dns_buffer *result;
    2929
    30         if (!(result = talloc(mem_ctx, struct dns_buffer))) {
     30        if (!(result = talloc_zero(mem_ctx, struct dns_buffer))) {
    3131                return NULL;
    3232        }
     
    4040        result->size = 2;
    4141
    42         if (!(result->data = TALLOC_ARRAY(result, uint8, result->size))) {
     42        if (!(result->data = TALLOC_ZERO_ARRAY(result, uint8, result->size))) {
    4343                TALLOC_FREE(result);
    4444                return NULL;
     
    217217        }
    218218
    219         if (!(label = talloc(mem_ctx, struct dns_domain_label))) {
     219        if (!(label = talloc_zero(mem_ctx, struct dns_domain_label))) {
    220220                buf->error = ERROR_DNS_NO_MEMORY;
    221221                return;
     
    224224        label->len = len;
    225225
    226         if (!(label->label = TALLOC_ARRAY(label, char, len+1))) {
     226        if (!(label->label = TALLOC_ZERO_ARRAY(label, char, len+1))) {
    227227                buf->error = ERROR_DNS_NO_MEMORY;
    228228                goto error;
     
    251251        if (!ERR_DNS_IS_OK(buf->error)) return;
    252252
    253         if (!(name = talloc(mem_ctx, struct dns_domain_name))) {
     253        if (!(name = talloc_zero(mem_ctx, struct dns_domain_name))) {
    254254                buf->error = ERROR_DNS_NO_MEMORY;
    255255                return;
     
    282282        if (!(ERR_DNS_IS_OK(buf->error))) return;
    283283
    284         if (!(q = talloc(mem_ctx, struct dns_question))) {
     284        if (!(q = talloc_zero(mem_ctx, struct dns_question))) {
    285285                buf->error = ERROR_DNS_NO_MEMORY;
    286286                return;
     
    315315        if (!(ERR_DNS_IS_OK(buf->error))) return;
    316316
    317         if (!(r = talloc(mem_ctx, struct dns_rrec))) {
     317        if (!(r = talloc_zero(mem_ctx, struct dns_rrec))) {
    318318                buf->error = ERROR_DNS_NO_MEMORY;
    319319                return;
     
    330330
    331331        if (r->data_length != 0) {
    332                 if (!(r->data = TALLOC_ARRAY(r, uint8, r->data_length))) {
     332                if (!(r->data = TALLOC_ZERO_ARRAY(r, uint8, r->data_length))) {
    333333                        buf->error = ERROR_DNS_NO_MEMORY;
    334334                        return;
     
    407407
    408408        if ((req->num_questions != 0) &&
    409             !(req->questions = TALLOC_ARRAY(req, struct dns_question *,
     409            !(req->questions = TALLOC_ZERO_ARRAY(req, struct dns_question *,
    410410                                            req->num_questions))) {
    411411                goto error;
    412412        }
    413413        if ((req->num_answers != 0) &&
    414             !(req->answers = TALLOC_ARRAY(req, struct dns_rrec *,
     414            !(req->answers = TALLOC_ZERO_ARRAY(req, struct dns_rrec *,
    415415                                          req->num_answers))) {
    416416                goto error;
    417417        }
    418418        if ((req->num_auths != 0) &&
    419             !(req->auths = TALLOC_ARRAY(req, struct dns_rrec *,
     419            !(req->auths = TALLOC_ZERO_ARRAY(req, struct dns_rrec *,
    420420                                        req->num_auths))) {
    421421                goto error;
    422422        }
    423423        if ((req->num_additionals != 0) &&
    424             !(req->additionals = TALLOC_ARRAY(req, struct dns_rrec *,
     424            !(req->additionals = TALLOC_ZERO_ARRAY(req, struct dns_rrec *,
    425425                                              req->num_additionals))) {
    426426                goto error;
Note: See TracChangeset for help on using the changeset viewer.