Ethereal-dev: [Ethereal-dev] [patch] gui_prefs.c bug; related to new_font_name

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date: Wed, 18 Apr 2001 02:30:07 +0900
Hi,

I found a bug in gtk/gui_prefs.c (ethereal-0.8.17a).

How to reproduce================
1. open a preference dialog box.
2. choose any font in "GUI" pane.
3. close the dialog box.
4. open the dialog box again.
5. close the dialog box.
6. ethereal crash.


Patch ==========================
diff -u -r1.1 gtk/gui_prefs.c
--- gtk/gui_prefs.c     2001/04/17 17:20:22     1.1
+++ gtk/gui_prefs.c     2001/04/17 17:21:52
@@ -510,8 +510,10 @@
        }
 
        /* Free up any saved font name. */
-       if (new_font_name != NULL)
+       if (new_font_name != NULL) {
                g_free(new_font_name);
+               new_font_name = NULL;
+       }
 }


Thanks.
- Inoue <inoue@xxxxxxxxxxx>