diff --git a/magick/cache.c b/magick/cache.c
index 706006d..4202322 100644
--- a/magick/cache.c
+++ b/magick/cache.c
@@ -651,6 +651,7 @@
   int
     status;
 
+  status=(-1);
   LockSemaphoreInfo(cache_info->disk_semaphore);
   if (cache_info->file != -1)
     status=close(cache_info->file);