[gnome-software] rpm-ostree: trivial: Fix use of uninitialize variable



commit e5e7a6d50d6a43a885881f4e12aea1c12da1dc19
Author: Kalev Lember <klember redhat com>
Date:   Thu Feb 28 14:43:20 2019 +0100

    rpm-ostree: trivial: Fix use of uninitialize variable

 plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
index b8258e45..49a81ba6 100644
--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
@@ -1359,7 +1359,7 @@ gs_plugin_file_to_app (GsPlugin *plugin,
                       GError **error)
 {
        gboolean ret = FALSE;
-       FD_t rpmfd;
+       FD_t rpmfd = NULL;
        int r;
        guint64 epoch;
        guint64 size;
@@ -1456,7 +1456,7 @@ gs_plugin_file_to_app (GsPlugin *plugin,
        ret = TRUE;
 
 out:
-       if (rpmfd)
+       if (rpmfd != NULL)
                (void) Fclose (rpmfd);
        return ret;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]