[poppler] Memory leak fix, correct or not?

Iñigo Martínez inigomartinez at gmail.com
Sat Oct 4 14:47:41 PDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


No, the code isn't mine. It's the original AnnotWidget/Form code I never
touched. It should take some time to understand it, so I worked on other
things, and that's why I can't say if it's ok.

Maybe anyone that worked on Forms could say something else. Sorry.

Albert Astals Cid escribió:
> Hi all, the attached code fixes a leak for me, but i'm not sure it's correct, 
> i tested a bit and could not see any regression, but i'm not sure either what 
> this code is supposed to do, besides modifying the AP :D
> 
> Iñigo i think the code is yours, could you have a look? And tell if it's ok?
> 
> Albert
> 
> diff --git a/poppler/Annot.cc b/poppler/Annot.cc
> index 6e35b2a..481b43d 100644
> --- a/poppler/Annot.cc
> +++ b/poppler/Annot.cc
> @@ -3066,8 +3066,8 @@ void AnnotWidget::generateFieldAppearance() {
>      oaRef.initRef(appRef.num, appRef.gen);
>  
>      apObj.dictSet("N", &oaRef);
> -    annot->set("AP", &apObj);
>      Dict* d = new Dict(annot);
> +    d->set("AP", &apObj);
>      d->decRef();
>      Object dictObj;
>      dictObj.initDict(d);

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjn5H0ACgkQYeZEGfB6+4JQTACgjKP46UuUjIVHshPxUNQBdQt7
QDQAoKKGdH6LdtiQ3B4P4z732ZTHYR7X
=/+Sl
-----END PGP SIGNATURE-----


More information about the poppler mailing list