diff --git a/pdf.c b/pdf.c
index c50cea5b54a57aef1aab4adc3e4659349943ac33..aea09f8601d53ccb315b09074c0218677b91fd6a 100644
--- a/pdf.c
+++ b/pdf.c
@@ -4927,7 +4927,6 @@ parse_xrefs(struct Env *aux)
 
 	for (;;) {
 		//res = h_parse(p_xref, input + offset, sz - offset);
-		p = NULL;
 		p = h_right(h_seek(offset * 8, SEEK_SET), p_xref);	// XXX
 		res = h_parse(p, input, sz);
 		if (res == NULL || res->ast == NULL || H_INDEX_TOKEN(res->ast, 0) == NULL) {