Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions open-vm-tools/libvmtools/i18n.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ MsgLoadCatalog(const char *path)
gboolean eof = FALSE;
char *name = NULL;
char *value = NULL;
gchar *line;
gchar *line = NULL;

/* Read the next key / value pair. */
for (;;) {
Expand All @@ -493,12 +493,13 @@ MsgLoadCatalog(const char *path)
gsize term;
char *unused = NULL;
gboolean cont = FALSE;
GIOStatus status;

g_io_channel_read_line(stream, &line, &len, &term, &err);
status = g_io_channel_read_line(stream, &line, &len, &term, &err);

if (err != NULL) {
if (status == G_IO_STATUS_ERROR || err != NULL) {
g_warning("Unable to read a line from '%s': %s\n",
path, err->message);
path, err ? err->message : "G_IO_STATUS_ERROR");
g_clear_error(&err);
error = TRUE;
g_free(line);
Expand Down