diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-12-20 19:19:54 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-01-02 09:53:27 +0000 |
commit | fb3522f33a565576002595bf03e07f6c8b16a471 (patch) | |
tree | cc50d4a2fd5450f78bebd6de27484f5451c70ff6 /src/cairo-os2-surface.c | |
parent | 8d23c3a6c2ab0ae168afb695e2b8c5f121ed2be3 (diff) |
[os2] Fix memory leak of surface on error path
Of we fail to create the mutex, free the surface before returning the
failure.
Reported: http://bugs.freedesktop.org/show_bug.cgi?id=19208.
Diffstat (limited to 'src/cairo-os2-surface.c')
-rw-r--r-- | src/cairo-os2-surface.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cairo-os2-surface.c b/src/cairo-os2-surface.c index 1f7b35e59..62b4ccdc6 100644 --- a/src/cairo-os2-surface.c +++ b/src/cairo-os2-surface.c @@ -788,6 +788,7 @@ cairo_os2_surface_create (HPS hps_client_window, FALSE); if (rc != NO_ERROR) { /* Could not create mutex semaphore! */ + free (local_os2_surface); return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } |