summaryrefslogtreecommitdiffstats
path: root/src/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/search.c b/src/search.c
index a038cfb..5278337 100644
--- a/src/search.c
+++ b/src/search.c
@@ -94,7 +94,8 @@ query_for_items_pbn(const recipe * r, const char * s, int strict)
pbg_parse(&e, &err, str);
if(pbg_iserror(&err)) {
fprintf(stderr, "Parsing error: %s => %s\n", s, str);
- free(query); free(str); free(err._data);
+ pbg_error_print(&err);
+ free(query); free(str); pbg_error_free(&err);
return -1;
}
@@ -103,11 +104,12 @@ query_for_items_pbn(const recipe * r, const char * s, int strict)
result = pbg_evaluate(&e, &err, NULL);
if(pbg_iserror(&err)) {
fprintf(stderr, "Eval error: %s => %s\n", s, str);
- free(query); free(str); pbg_free(&e); free(err._data);
+ pbg_error_print(&err);
+ free(query); free(str); pbg_free(&e); pbg_error_free(&err);
return -1;
}
- free(query); free(str); pbg_free(&e);
+ free(query); free(str); pbg_free(&e); pbg_error_free(&err);
return (result == PBG_TRUE) ? 1 : 0;
}