diff options
author | Richard van der Hoff <richard@matrix.org> | 2015-10-30 11:54:18 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2015-10-30 11:54:18 +0000 |
commit | 41013a966993de1d6186d2f492dc04c3d729edab (patch) | |
tree | 9febf4a20ddd59f854997788d7b15db10994851d /matrix-api.c | |
parent | 5e45a7d963b848ff9603575948f03927e5ed0b3a (diff) | |
download | purple-matrix-41013a966993de1d6186d2f492dc04c3d729edab.tar.gz |
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.
Diffstat (limited to 'matrix-api.c')
-rw-r--r-- | matrix-api.c | 2 |
1 files changed, 1 insertions, 1 deletions
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", |