Re: [PATCH 02/10] kdrive: Xv code expects attribute names to be allocated each generation

2014-03-20 Thread Keith Packard
Markus Wick  writes:

> 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?

Sounds like Eric has done that.

-- 
keith.pack...@intel.com


pgptMmoB1cQY5.pgp
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH 02/10] kdrive: Xv code expects attribute names to be allocated each generation

2014-03-13 Thread Markus Wick

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 
---
 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;

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 02/10] kdrive: Xv code expects attribute names to be allocated each generation

2014-03-13 Thread 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 
---
 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;
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel