From 364efc6f229f0fb5d743ed24a6617af4499347f8 Mon Sep 17 00:00:00 2001 From: Peter Hofmann Date: Sat, 28 Jan 2017 18:13:46 +0100 Subject: s/malloc/calloc --- browser.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'browser.c') 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); -- cgit v1.2.3