Initialize if_device to NULL at start and when g_free.

This fixes a bug introduced in revision 36741.

svn path=/trunk/; revision=36929
This commit is contained in:
Stig Bjørlykke 2011-04-28 08:48:35 +00:00
parent 42f8e1fa5a
commit de18d83f61
1 changed files with 2 additions and 1 deletions

View File

@ -1722,7 +1722,7 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
#endif
guint32 value;
gchar *cap_title;
gchar *if_device="";
gchar *if_device = NULL;
if_info_t *if_info;
int if_index = 0;
@ -1861,6 +1861,7 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
}
}
g_free(if_device);
if_device = NULL;
}
/* If we have a prefered interface, get the string to compare with to select the active text*/