Skip to content

Commit

Permalink
Add missing free for json_error in response stack
Browse files Browse the repository at this point in the history
  • Loading branch information
bartkessels committed Jan 23, 2018
1 parent d617a4a commit 9ce8d9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/getit-content-response.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ getit_content_response_show_response (GetitContentResponse *self,
GtkTextBuffer *text_buffer_pretty;
GtkTextBuffer *text_buffer_raw;
const gchar *mimetype;
GError *json_error;
GError *json_error = NULL;
JsonParser *json_parser;
GString *string_response;
GBytes *bytes_response;
Expand Down Expand Up @@ -180,6 +180,8 @@ getit_content_response_show_response (GetitContentResponse *self,
pretty_json = json_generator_to_data (json_generator, NULL);

gtk_text_buffer_set_text (text_buffer_pretty, pretty_json, strlen(pretty_json));
} else {
g_error_free (json_error);
}

/* Load webview */
Expand Down

0 comments on commit 9ce8d9a

Please sign in to comment.