From e53c4f335802aa7e8d617b4dafc0908bc50cabce Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Mon, 30 Aug 2010 15:36:23 +0200 Subject: [PATCH] Fix: allocating string on odr memory --- src/solr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/solr.c b/src/solr.c index 33c81b0..807326e 100644 --- a/src/solr.c +++ b/src/solr.c @@ -135,7 +135,7 @@ static Z_AttributeList *yaz_solr_use_atttribute_create(ODR o, const char *name) elements[0]->value.complex->list = (Z_StringOrNumeric **) odr_malloc(o, 1 * sizeof(Z_StringOrNumeric *)); elements[0]->value.complex->list[0] = (Z_StringOrNumeric *) odr_malloc(o, sizeof(Z_StringOrNumeric)); elements[0]->value.complex->list[0]->which = Z_StringOrNumeric_string; - elements[0]->value.complex->list[0]->u.string = (Z_InternationalString *) name; + elements[0]->value.complex->list[0]->u.string = (Z_InternationalString *) odr_strdup(o, name); elements[0]->value.complex->semanticAction = 0; elements[0]->value.complex->num_semanticAction = 0; attributes->attributes = elements; -- 1.7.10.4