summaryrefslogtreecommitdiffstats
path: root/src/search.c
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2022-10-14 22:11:50 +0300
committergramanas <anastasis.gramm2@gmail.com>2022-10-14 22:11:50 +0300
commit7b7240d50dd5e418bc17beff48aa5681b398b980 (patch)
treeb521f1da139ce85974b71f1698cc140b1e7fed6c /src/search.c
parent433ce0f6795a4db89921b26274dd0b18fcccbb21 (diff)
downloadfoodtools-7b7240d50dd5e418bc17beff48aa5681b398b980.tar.gz
foodtools-7b7240d50dd5e418bc17beff48aa5681b398b980.tar.bz2
foodtools-7b7240d50dd5e418bc17beff48aa5681b398b980.zip
More changes
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;
}