summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hofmann <scm@uninformativ.de>2017-01-28 18:13:46 +0100
committerPeter Hofmann <scm@uninformativ.de>2017-01-28 18:13:46 +0100
commit364efc6f229f0fb5d743ed24a6617af4499347f8 (patch)
treed5ffde50ad1cd2b39c268b0ebb4e6a3de4a2dad5
parent88b496e1537107361d9aba25b4c54176f13e8ecb (diff)
downloadlariza-364efc6f229f0fb5d743ed24a6617af4499347f8.tar.gz
s/malloc/calloc
-rw-r--r--browser.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/browser.c b/browser.c
index d411f6a..05e74e2 100644
--- 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);