Closed Bug 505728 Opened 15 years ago Closed 13 years ago

_wrap_image leaks data if cairo_image_surface_create_for_data fails

Categories

(Core :: Graphics, defect)

x86
Linux
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 526976

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity, memory-leak)

Attachments

(1 file, 1 obsolete file)

1313     struct acquire_source_image_data *data = malloc(sizeof(*data));

this function call will only adopt data if it's successful, on failure, the data is ours, and it's our job to free it:
1318     surface = (cairo_image_surface_t*)cairo_image_surface_create_for_data (image->data,

1323     status = surface->base.status;
here we leak it:
1324 if (status)
1325 return status;
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #390174 - Flags: review?(vladimir)
Attachment #390174 - Flags: review?(vladimir) → review?(jmuizelaar)
Attached patch updated reviewerSplinter Review
Attachment #390174 - Attachment is obsolete: true
Attachment #391613 - Flags: review?(jmuizelaar)
Attachment #390174 - Flags: review?(jmuizelaar)
Comment on attachment 391613 [details] [diff] [review]
updated reviewer

I believe this is already fixed.
Attachment #391613 - Flags: review?(jmuizelaar) → review-
Fixed as part of bug 526976
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: