From 41013a966993de1d6186d2f492dc04c3d729edab Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 30 Oct 2015 11:54:18 +0000 Subject: Fix segfault when JSON parsing fails We weren't correctly initialising a GError *, which meant that we then tried to display the error message from an invalid location. --- matrix-api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'matrix-api.c') diff --git a/matrix-api.c b/matrix-api.c index 7821bf9..706ef58 100644 --- a/matrix-api.c +++ b/matrix-api.c @@ -206,7 +206,7 @@ static int _handle_body(http_parser *http_parser, const char *at, size_t length) { MatrixApiResponseParserData *response_data = http_parser->data; - GError *err; + GError *err = NULL; if(purple_debug_is_verbose()) purple_debug_info("matrixprpl", "Handling API response body %.*s\n", -- cgit