diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2024-01-22 15:18:57 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2024-01-22 15:18:57 (GMT) |
commit | 1790f1a21583d94c24aeb9549053e426dbdebb40 (patch) | |
tree | dbe519055ca7c0d74fb569ce8fbe25dcaed30e55 /src | |
parent | 0ff1e52622828663d01f98c97f2cd8eccb8facf8 (diff) |
Take errors occurring while creating scan contexts into account.
Diffstat (limited to 'src')
-rw-r--r-- | src/rost.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -504,6 +504,7 @@ int main(int argc, char **argv) if (content == NULL) goto bad_file_content; context = g_content_scanner_analyze(scanner, options, content); + if (context == NULL) goto bad_scan_context; if (g_scan_options_get_print_json(options)) { @@ -522,6 +523,9 @@ int main(int argc, char **argv) } g_object_unref(G_OBJECT(context)); + + bad_scan_context: + g_object_unref(G_OBJECT(content)); bad_file_content: |