From 8353acdf0864ccb35259d4c765a2d3a2294826d0 Mon Sep 17 00:00:00 2001 From: sezero Date: Thu, 16 Jun 2016 11:47:00 +0300 Subject: [PATCH] replaced a malloc()+bzero() with calloc() --- src/wm_error.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wm_error.c b/src/wm_error.c index a0837752..ed18c3d4 100644 --- a/src/wm_error.c +++ b/src/wm_error.c @@ -77,8 +77,7 @@ void _WM_GLOBAL_ERROR(const char * func, const char * file, unsigned int lne, in if (_WM_Global_ErrorS != NULL) free(_WM_Global_ErrorS); - errorstring = malloc(MAX_ERROR_LEN+1); - bzero(errorstring, MAX_ERROR_LEN+1); + errorstring = calloc(1, MAX_ERROR_LEN+1); if (error == 0) { if (wmfor == NULL) {