Blame SOURCES/0014-Set-freed-variables-to-NULL-in-remote_viewer_start.patch

4ab194
From 5e8642eb1f32109bf4801bd903fa945f580c0f2a Mon Sep 17 00:00:00 2001
4ab194
From: Jonathon Jongsma <jjongsma@redhat.com>
4ab194
Date: Tue, 3 Jun 2014 11:13:14 -0500
4ab194
Subject: [PATCH] Set freed variables to NULL in remote_viewer_start()
4ab194
4ab194
Coverity warns that 'type' can sometimes be used or free after already having
4ab194
been freed.  This can happen when open_recent_dialog is true and we jump back up
4ab194
to the retry_dialog label.  To prevent this, make sure the freed variables are
4ab194
set to NULL after freeing.
4ab194
---
4ab194
 src/remote-viewer.c | 2 ++
4ab194
 1 file changed, 2 insertions(+)
4ab194
4ab194
diff --git a/src/remote-viewer.c b/src/remote-viewer.c
4ab194
index 768ff74..5fa4ee4 100644
4ab194
--- a/src/remote-viewer.c
4ab194
+++ b/src/remote-viewer.c
4ab194
@@ -1043,7 +1043,9 @@ cleanup:
4ab194
     g_clear_object(&file;;
4ab194
     g_clear_object(&vvfile);
4ab194
     g_free(guri);
4ab194
+    guri = NULL;
4ab194
     g_free(type);
4ab194
+    type = NULL;
4ab194
 
4ab194
     if (!ret && priv->open_recent_dialog) {
4ab194
         goto retry_dialog;