Yeah, this fixes a crash in
"kdrive: Remove duplicated definitions of some XV-related structs.".
But as this patch was skipped in the megaseries, there is no need in only applying this fix.

Maybe squashing both patches together as the origin was a nice cleanup?

Am 2014-03-14 07:29, schrieb Keith Packard:
Xv frees the attribute names for each X server generation; reset the
server twice without allocating them  again and you get malloc
complaints (or worse).

Signed-off-by: Keith Packard <[email protected]>
---
 hw/kdrive/src/kxv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c
index 6f3d85e..f5b1e8a 100644
--- a/hw/kdrive/src/kxv.c
+++ b/hw/kdrive/src/kxv.c
@@ -371,6 +371,7 @@ KdXVInitAdaptors(ScreenPtr pScreen,
KdVideoAdaptorPtr * infoPtr, int number)
for (pat = pAttribute, attributePtr = adaptorPtr->pAttributes, i = 0; i < adaptorPtr->nAttributes; pat++, i++, attributePtr++) {
                 memcpy(pat, attributePtr, sizeof(*pat));
+                pat->name = strdup(pAttribute->name);
             }
             pa->nAttributes = adaptorPtr->nAttributes;
             pa->pAttributes = pAttribute;
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to