From a30623c65cbceab305e30d309e53cf3f2d038e1f Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 26 Nov 2013 10:40:53 +0100 Subject: [PATCH] Revert "lib/util_hash.c: xbps_file_hash: remove unnecessary memset() call." This reverts commit febc673f1e7af9e795903fbef683670e46cf786d. --- lib/util_hash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/util_hash.c b/lib/util_hash.c index 09ddf200..777a95e9 100644 --- a/lib/util_hash.c +++ b/lib/util_hash.c @@ -78,6 +78,7 @@ xbps_file_hash(const char *file) free(buf); return NULL; } + memset(&st, 0, sizeof(st)); if (fstat(fd, &st) == -1) { (void)close(fd); return NULL;