Fix pixmap double-frees on error paths.
authorJamey Sharp <jamey@minilop.net>
Wed, 15 Sep 2010 01:35:21 +0000 (18:35 -0700)
committerJamey Sharp <jamey@minilop.net>
Tue, 20 Sep 2011 06:36:43 +0000 (23:36 -0700)
commit0f380a5005f800572773cd4667ce43c7459cc467
tree07f8bc5de2a8a76c6c82202105876c677b6ae448
parent8f69c935f6d06ad92fd0e8d9fcb3cde86cd258f5
Fix pixmap double-frees on error paths.

If AddResource fails, it will automatically free the object that was
passed to it by calling the appropriate deleteFunc; and of course
FreeResource also calls the deleteFunc. In both cases it's wrong to call
the destroy hook manually.

Commit by Jamey Sharp and Josh Triplett.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Xext/shm.c
dix/dispatch.c