Call relevance_destroy before nmem_reset
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 23 Apr 2010 11:33:58 +0000 (13:33 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 23 Apr 2010 11:33:58 +0000 (13:33 +0200)
This to a void that relevance_destroy refers to NMEM released
memory.

src/session.c

index 3034f7e..4653238 100644 (file)
@@ -523,8 +523,8 @@ enum pazpar2_error_code search(struct session *se,
     session_enter(se);
     reclist_destroy(se->reclist);
     se->reclist = 0;
-    nmem_reset(se->nmem);
     relevance_destroy(&se->relevance);
+    nmem_reset(se->nmem);
     se->total_records = se->total_hits = se->total_merged = 0;
     se->num_termlists = 0;
     live_channels = select_targets(se, filter);