X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fzget.c;h=6febde05b0dd9b265cbdb58cc70a908bb06315c5;hb=80559dbf0a5d6993eef844e6f6198d28ff5a44fa;hp=1f0f97f1d58af99ab087f096469c7e197580c7f7;hpb=5242cb5a8634bfa38b9333ff7f903e718ac6e292;p=yaz-moved-to-github.git diff --git a/src/zget.c b/src/zget.c index 1f0f97f..6febde0 100644 --- a/src/zget.c +++ b/src/zget.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2012 Index Data + * Copyright (C) 1995-2013 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 = (unsigned 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);