X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fzget.c;h=7b112175f256b62fced98b2d6f94435508bc8359;hp=5fb5283f4cc35c97d76d37e2e140757c91e331a8;hb=8cb8947e3a7bff4dbf8f124871cb4905df1adce7;hpb=69b1d8e7b437179163fe97b7cbead51a56835f2a diff --git a/src/zget.c b/src/zget.c index 5fb5283..7b11217 100644 --- a/src/zget.c +++ b/src/zget.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ /** @@ -636,10 +636,7 @@ Z_External *zget_init_diagnostics_octet(ODR odr, int error, x->indirect_reference = 0; x->direct_reference = odr_oiddup(odr, yaz_oid_userinfo_userinfo_1); x->which = Z_External_octet; - x->u.octet_aligned = (Odr_oct *) odr_malloc(odr, sizeof(Odr_oct)); - x->u.octet_aligned->buf = (char *) odr_malloc(odr, octet_len); - memcpy(x->u.octet_aligned->buf, octet_buf, octet_len); - x->u.octet_aligned->len = octet_len; + x->u.octet_aligned = odr_create_Odr_oct(odr, octet_buf, octet_len); odr_destroy(encode);