X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=src%2Fpazpar2.c;h=cb6a38483a60b35306f37d8f3ce786b0c7da5610;hb=7ce18cf5c766487c184322478d9a656ac63e1456;hp=049fa85392526f6c19eaf88ba82a689f1ca900de;hpb=5017b103ece3eeb4e3ab181d5e49d50af8e56018;p=pazpar2-moved-to-github.git diff --git a/src/pazpar2.c b/src/pazpar2.c index 049fa85..cb6a384 100644 --- a/src/pazpar2.c +++ b/src/pazpar2.c @@ -1,4 +1,4 @@ -/* $Id: pazpar2.c,v 1.14 2007-01-04 22:04:25 quinn Exp $ */; +/* $Id: pazpar2.c,v 1.15 2007-01-05 20:33:05 adam Exp $ */; #include #include @@ -431,6 +431,7 @@ static struct record *ingest_record(struct client *cl, Z_External *rec) if (!(mergekey = xmlGetProp(root, "mergekey"))) { yaz_log(YLOG_WARN, "No mergekey found in record"); + xmlFreeDoc(xdoc); return 0; } @@ -446,6 +447,12 @@ static struct record *ingest_record(struct client *cl, Z_External *rec) res->merge_key = normalize_mergekey(mergekey_norm); head = reclist_insert(se->reclist, res); + if (!head) + { + /* no room for record */ + xmlFreeDoc(xdoc); + return 0; + } relevance_newrec(se->relevance, head); for (n = root->children; n; n = n->next)