Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
08d49d3e
Commit
08d49d3e
authored
Mar 07, 2008
by
Nathan Beckmann
Committed by
Alexandre Julliard
Mar 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Fix memory leak in GdipLockBitmapBits.
parent
738e74a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
image.c
dlls/gdiplus/image.c
+6
-3
No files found.
dlls/gdiplus/image.c
View file @
08d49d3e
...
@@ -170,8 +170,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect,
...
@@ -170,8 +170,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect,
bitmap
->
lockmode
=
flags
;
bitmap
->
lockmode
=
flags
;
bitmap
->
numlocks
++
;
bitmap
->
numlocks
++
;
if
(
flags
&
ImageLockModeWrite
)
bitmap
->
bitmapbits
=
buff
;
bitmap
->
bitmapbits
=
buff
;
return
Ok
;
return
Ok
;
}
}
...
@@ -198,7 +197,8 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap,
...
@@ -198,7 +197,8 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap,
if
(
!
(
--
bitmap
->
numlocks
))
if
(
!
(
--
bitmap
->
numlocks
))
bitmap
->
lockmode
=
0
;
bitmap
->
lockmode
=
0
;
GdipFree
(
lockeddata
->
Scan0
);
GdipFree
(
bitmap
->
bitmapbits
);
bitmap
->
bitmapbits
=
NULL
;
return
Ok
;
return
Ok
;
}
}
...
@@ -225,6 +225,7 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap,
...
@@ -225,6 +225,7 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap,
}
}
GdipFree
(
bitmap
->
bitmapbits
);
GdipFree
(
bitmap
->
bitmapbits
);
bitmap
->
bitmapbits
=
NULL
;
return
Ok
;
return
Ok
;
}
}
...
@@ -426,6 +427,8 @@ GpStatus WINGDIPAPI GdipDisposeImage(GpImage *image)
...
@@ -426,6 +427,8 @@ GpStatus WINGDIPAPI GdipDisposeImage(GpImage *image)
IPicture_get_CurDC
(
image
->
picture
,
&
hdc
);
IPicture_get_CurDC
(
image
->
picture
,
&
hdc
);
DeleteDC
(
hdc
);
DeleteDC
(
hdc
);
IPicture_Release
(
image
->
picture
);
IPicture_Release
(
image
->
picture
);
if
(
image
->
type
==
ImageTypeBitmap
)
GdipFree
(((
GpBitmap
*
)
image
)
->
bitmapbits
);
GdipFree
(
image
);
GdipFree
(
image
);
return
Ok
;
return
Ok
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment