Avoid work on bad metadata (0 prt ref)
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 14 Oct 2011 10:30:21 +0000 (12:30 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 14 Oct 2011 10:30:21 +0000 (12:30 +0200)
Problem introduced in commit 9d9593.

src/session.c

index 9de7ed9..1be728f 100644 (file)
@@ -1667,6 +1667,9 @@ static int ingest_to_cluster(struct client *cl,
             // merged metadata
             rec_md = record_metadata_init(se->nmem, (const char *) value,
                                           ser_md->type, 0);
+            if (!rec_md)
+                continue;
+
             wheretoput = &cluster->metadata[md_field_id];
 
             // and polulate with data: