oleaut32: Remove redundant NULL checks before free (found by Smatch)
James Hawkins
truiken at gmail.com
Thu Oct 5 22:03:40 CDT 2006
Hi,
Changelog:
* Remove redundant NULL checks before free (found by Smatch).
dlls/oleaut32/ungif.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
--
James Hawkins
-------------- next part --------------
diff --git a/dlls/oleaut32/ungif.c b/dlls/oleaut32/ungif.c
index 7ee6e83..c630522 100644
--- a/dlls/oleaut32/ungif.c
+++ b/dlls/oleaut32/ungif.c
@@ -231,8 +231,7 @@ FreeSavedImages(GifFileType * GifFile) {
sp->ImageDesc.ColorMap = NULL;
}
- if (sp->RasterBits)
- free(sp->RasterBits);
+ free(sp->RasterBits);
if (sp->ExtensionBlocks)
FreeExtension(sp);
@@ -962,10 +961,8 @@ DGifCloseFile(GifFileType * GifFile) {
GifFile->SColorMap = NULL;
}
- if (Private) {
- free(Private);
- Private = NULL;
- }
+ free(Private);
+ Private = NULL;
if (GifFile->SavedImages) {
FreeSavedImages(GifFile);
--
1.4.2.1
More information about the wine-patches
mailing list