From 36c79fc167a0af28ce3840ffc4ec907501eb4e02 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 22 Dec 2011 21:47:32 +0100 Subject: [PATCH] xbps_handle_alloc: use calloc to avoid using unitilizated value. --- lib/initend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/initend.c b/lib/initend.c index ba9c786e..92e1c1b7 100644 --- a/lib/initend.c +++ b/lib/initend.c @@ -211,7 +211,7 @@ xbps_handle_get(void) struct xbps_handle * xbps_handle_alloc(void) { - return malloc(sizeof(struct xbps_handle)); + return calloc(1, sizeof(struct xbps_handle)); } static void