[tracker] libtracker-data: Plug parser leak on error
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Plug parser leak on error
- Date: Wed, 17 Apr 2019 12:11:23 +0000 (UTC)
commit 12e40a5fe525f87bd0e8ca1fb432b37d908d6fea
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Apr 17 13:39:22 2019 +0200
libtracker-data: Plug parser leak on error
We would leak the parsing tree accumulated thus far on errors. Good
news is that it's potentially unlikely, bad news is that it's potentially
big.
src/libtracker-data/tracker-sparql-parser.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/src/libtracker-data/tracker-sparql-parser.c b/src/libtracker-data/tracker-sparql-parser.c
index d6cc6e532..8afee0587 100644
--- a/src/libtracker-data/tracker-sparql-parser.c
+++ b/src/libtracker-data/tracker-sparql-parser.c
@@ -741,6 +741,7 @@ tracker_grammar_parser_apply (TrackerGrammarParser *parser,
if (!tracker_grammar_parser_read (parser, &state)) {
tracker_parser_state_propagate_error (&state, error);
+ tracker_node_tree_free (state.node_tree);
g_free (state.rule_states.rules);
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]