Commit dd10a8f5 authored by Richard Hughes's avatar Richard Hughes
Browse files

trivial: Fix a tiny memory leak when using 'dfu-tool dump'

parent 3f406685
...@@ -1729,6 +1729,7 @@ dfu_tool_dump (DfuToolPrivate *priv, gchar **values, GError **error) ...@@ -1729,6 +1729,7 @@ dfu_tool_dump (DfuToolPrivate *priv, gchar **values, GError **error)
/* open files */ /* open files */
for (guint i = 0; values[i] != NULL; i++) { for (guint i = 0; values[i] != NULL; i++) {
g_autofree gchar *tmp = NULL;
g_autoptr(DfuFirmware) firmware = NULL; g_autoptr(DfuFirmware) firmware = NULL;
g_autoptr(GFile) file = NULL; g_autoptr(GFile) file = NULL;
g_autoptr(GError) error_local = NULL; g_autoptr(GError) error_local = NULL;
...@@ -1742,7 +1743,8 @@ dfu_tool_dump (DfuToolPrivate *priv, gchar **values, GError **error) ...@@ -1742,7 +1743,8 @@ dfu_tool_dump (DfuToolPrivate *priv, gchar **values, GError **error)
error_local->message); error_local->message);
continue; continue;
} }
g_print ("%s\n", dfu_firmware_to_string (firmware)); tmp = dfu_firmware_to_string (firmware);
g_print ("%s\n", tmp);
} }
return TRUE; return TRUE;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment