Commit Graph

6 Commits

Author SHA1 Message Date
Alan Coopersmith
1c56ac63c0 Convert top level extensions to new *allocarray functions
v2: remove now useless parentheses

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21 16:57:08 -07:00
Keith Packard
60014a4a98 Replace 'pointer' type with 'void *'
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer'
is used throughout the X server for other things, and having duplicate
names generates compiler warnings.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-12 10:24:11 -08:00
Alan Coopersmith
42e655de4d rrproviderproperty.c: free newly allocated prop in more error paths
Reported by parfait 1.0:

Error: Memory leak (CWE 401)
   Memory leak of pointer 'prop' allocated with RRCreateProviderProperty(property)
        at line 221 of randr/rrproviderproperty.c in function 'RRChangeProviderProperty'.
          'prop' allocated at line 155 with RRCreateProviderProperty(property).
          prop leaks when pending != 0 at line 161.

Error: Memory leak (CWE 401)
   Memory leak of pointer 'prop' allocated with RRCreateProviderProperty(property)
        at line 345 of randr/rrproviderproperty.c in function 'RRConfigureProviderProperty'.
          'prop' allocated at line 333 with RRCreateProviderProperty(property).
        at line 349 of randr/rrproviderproperty.c in function 'RRConfigureProviderProperty'.
          'prop' allocated at line 333 with RRCreateProviderProperty(property).

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2012-08-06 15:22:53 -07:00
Alan Coopersmith
a6c5b8d3ee Use C99 designated initializers in RandR 1.4 extension Events
RandR 1.4 was going through review in parallel with main batch of
C99 initialization changes - sync up now that both have landed.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2012-07-16 21:25:07 -07:00
Alan Coopersmith
ada04ef0ca Use C99 designated initializers in RandR 1.4 extension Replies
RandR 1.4 was going through review in parallel with main batch of
C99 initialization changes - sync up now that both have landed.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2012-07-16 21:25:07 -07:00
Dave Airlie
66d92afeae randr: add provider object and provider property support (v6)
This adds the initial provider object and provider property
support to the randr dix code.

v2: destroy provider in screen close
v2.1: fix whitespace

v3: update for latest rev of protocol + renumber after 1.4 tearout.

v4: fix logic issue, thanks Samsagax on irc

v5: keithp's review: fix current_role, fix copyrights, fix master
reporting crtc/outputs.

v6: port to new randr interface, drop all set role bits for now

v7: drop devPrivate in provider, not needed, add BadMatch returns
for NULL SetProviderOffloadSink and SetProviderOutputSource, drop
the old typedef.

Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-06 22:16:02 +01:00