aboutsummaryrefslogtreecommitdiff
path: root/src/stylesheet.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2018-10-30 17:56:38 +0100
committerThomas White <taw@bitwiz.me.uk>2018-10-30 17:56:38 +0100
commit19f20ab06476f93977d1c7130b76f7c31d198936 (patch)
tree5410b960ab5b00d043a0d828299116baf38d0eeb /src/stylesheet.c
parent6171bc9d7f86ea0ac1c6abd4a213850fa4f81300 (diff)
Fix errors reported by static analyser
Diffstat (limited to 'src/stylesheet.c')
-rw-r--r--src/stylesheet.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/stylesheet.c b/src/stylesheet.c
index dbafd8c..a057935 100644
--- a/src/stylesheet.c
+++ b/src/stylesheet.c
@@ -104,12 +104,14 @@ Stylesheet *stylesheet_load(GFile *file)
if ( !g_file_load_contents(file, NULL, &everything, &len, NULL, NULL) ) {
fprintf(stderr, _("Failed to load stylesheet '%s'\n"),
g_file_get_uri(file));
+ free(ss);
return NULL;
}
r = json_parser_load_from_data(parser, everything, len, &err);
if ( r == FALSE ) {
fprintf(stderr, "Failed to load style sheet: '%s'\n", err->message);
+ free(ss);
return NULL;
}