Set freed variables to NULL in remote_viewer_start()

Coverity warns that 'type' can sometimes be used or free after already having
been freed.  This can happen when open_recent_dialog is true and we jump back up
to the retry_dialog label.  To prevent this, make sure the freed variables are
set to NULL after freeing.
This commit is contained in:
Jonathon Jongsma 2014-06-03 11:13:14 -05:00
parent 3e9d9266d9
commit e23f6fa4c4

View File

@ -1097,7 +1097,9 @@ cleanup:
g_clear_object(&file);
g_clear_object(&vvfile);
g_free(guri);
guri = NULL;
g_free(type);
type = NULL;
if (!ret && priv->open_recent_dialog) {
goto retry_dialog;