From 7b7240d50dd5e418bc17beff48aa5681b398b980 Mon Sep 17 00:00:00 2001 From: gramanas Date: Fri, 14 Oct 2022 22:11:50 +0300 Subject: More changes --- src/search.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/search.c') 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; } -- cgit v1.2.3