Commit Diff


commit - fedfac2c387cf3b4cb9e3530c517197190dadc2c
commit + 0699dbc20feda4209ace57a148624da7beceb692
blob - 5edec873237b86475f93e4ae732e61a2d81e8553
blob + 4ba630b800dab6a323fdb7c5e2d6927c17956784
--- lib/deflate.c
+++ lib/deflate.c
@@ -40,7 +40,7 @@ got_deflate_init(struct got_deflate_buf *zb, uint8_t *
 	const struct got_error *err = NULL;
 	int zerr;
 
-	memset(&zb->z, 0, sizeof(zb->z));
+	memset(zb, 0, sizeof(*zb));
 
 	zb->z.zalloc = Z_NULL;
 	zb->z.zfree = Z_NULL;