[gnome-builder] snippet: fix condition and leak
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] snippet: fix condition and leak
- Date: Thu, 10 Mar 2016 22:29:08 +0000 (UTC)
commit c777ed770c434819450dbf93f007dd73b9bcbc04
Author: Sebastien Lafargue <slafargue gnome org>
Date: Thu Mar 10 23:21:56 2016 +0100
snippet: fix condition and leak
libide/ide-source-snippet-parser.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libide/ide-source-snippet-parser.c b/libide/ide-source-snippet-parser.c
index f3ce04b..a5b4a7e 100644
--- a/libide/ide-source-snippet-parser.c
+++ b/libide/ide-source-snippet-parser.c
@@ -507,7 +507,7 @@ ide_source_snippet_parser_load_from_file (IdeSourceSnippetParser *parser,
GError **error)
{
GFileInputStream *file_stream;
- GDataInputStream *data_stream;
+ g_autoptr(GDataInputStream) *data_stream;
GError *local_error = NULL;
gchar *line;
gchar *basename = NULL;
@@ -532,7 +532,7 @@ ide_source_snippet_parser_load_from_file (IdeSourceSnippetParser *parser,
again:
line = g_data_input_stream_read_line_utf8 (data_stream, NULL, NULL, &local_error);
- if (line && local_error)
+ if (!line && local_error)
{
g_propagate_error (error, local_error);
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]