[epiphany] Make sure the strings are initialized to NULL



commit 0239346f27870ace37d8819cd7f934c34d83a01c
Author: Gustavo Noronha Silva <gns gnome org>
Date:   Thu Feb 18 16:39:24 2010 -0200

    Make sure the strings are initialized to NULL
    
    This fixes a crash reported ad-hoc in
    https://bugzilla.gnome.org/show_bug.cgi?id=609753.  This is needed
    because we may bail out early, and try to free these strings without
    having properly initialized them.

 embed/ephy-web-view.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 7f2a493..ca32314 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -998,10 +998,10 @@ form_submitted_cb (JSContextRef js_context,
   JSStringRef js_string;
   JSValueRef js_value;
   StorePasswordData *store_data;
-  char *name_field_name;
-  char *name_field_value;
-  char *password_field_name;
-  char *password_field_value;
+  char *name_field_name = NULL;
+  char *name_field_value = NULL;
+  char *password_field_name = NULL;
+  char *password_field_value = NULL;
   SoupURI *uri;
   WebKitWebView *web_view;
 



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