ref: c962ff8e70b5fb31c6f4ee3886eb20af65e21e18
parent: 93f2d56c54714742c8494e154ddf89daaccb4211
author: Sigrid Haflínudóttir <[email protected]>
date: Tue Sep 1 17:01:15 EDT 2020
pdfobj: another return early error
--- a/object.c
+++ b/object.c
@@ -137,11 +137,14 @@
xref.id = o->num;
xref.gen = o2->num;
/* FIXME put into a map */
- pdfobjfree(o);
pdfobjfree(o2);
- if((o = pdfobj(pdf, s)) != nil)
- return o;
- o2 = nil;
+ if((o2 = pdfobj(pdf, s)) != nil){
+ pdfobjfree(o);
+ return o2;
+ }else{
+ werrstr("obj: %r");
+ goto err;
+ }
}
}