[poppler] Memory leak fix, correct or not?

Albert Astals Cid aacid at kde.org
Sun Jan 4 05:06:43 PST 2009


A Dissabte 04 Octubre 2008, Albert Astals Cid va escriure:
> 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?

The patch was not correct, i've just commit the correct fix.

Albert

>
> 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);
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler




More information about the poppler mailing list