zero-initialize object_info structs
[gitweb.git] / sha1_file.c
index 67e815b2db00e4d406693f82e96b11bb701509a5..79ef052b1139354f2d6a8e77cd238d9eb1f0d5ec 100644 (file)
@@ -2409,7 +2409,7 @@ int sha1_object_info_extended(const unsigned char *sha1, struct object_info *oi)
 
 int sha1_object_info(const unsigned char *sha1, unsigned long *sizep)
 {
-       struct object_info oi;
+       struct object_info oi = {0};
 
        oi.sizep = sizep;
        return sha1_object_info_extended(sha1, &oi);