]> git.armaanb.net Git - chorizo.git/commitdiff
s/malloc/calloc
authorPeter Hofmann <scm@uninformativ.de>
Sat, 28 Jan 2017 17:13:46 +0000 (18:13 +0100)
committerPeter Hofmann <scm@uninformativ.de>
Sat, 28 Jan 2017 17:13:46 +0000 (18:13 +0100)
browser.c

index d411f6adb46f3b090202e45f9c943b34e0589b91..05e74e278f56359000e0d61ca359be19c2787538 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -125,16 +125,13 @@ client_new(const gchar *uri)
         return NULL;
     }
 
-    c = malloc(sizeof(struct Client));
+    c = calloc(1, sizeof(struct Client));
     if (!c)
     {
-        fprintf(stderr, __NAME__": fatal: malloc failed\n");
+        fprintf(stderr, __NAME__": fatal: calloc failed\n");
         exit(EXIT_FAILURE);
     }
 
-    c->external_handler_uri = NULL;
-    c->hover_uri = NULL;
-    c->win = NULL;
     if (embed != 0)
     {
         c->win = gtk_plug_new(embed);