Juan Lang : oleaut32: Don't mix allocation routines.

Alexandre Julliard julliard at wine.codeweavers.com
Fri May 18 08:03:54 CDT 2007


Module: wine
Branch: master
Commit: 37386dba7ab69e545121cfc2bc45129374e9bd55
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=37386dba7ab69e545121cfc2bc45129374e9bd55

Author: Juan Lang <juan_lang at yahoo.com>
Date:   Thu May 17 11:40:04 2007 -0700

oleaut32: Don't mix allocation routines.

---

 dlls/oleaut32/ungif.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/oleaut32/ungif.c b/dlls/oleaut32/ungif.c
index e80f8ab..415e7bf 100644
--- a/dlls/oleaut32/ungif.c
+++ b/dlls/oleaut32/ungif.c
@@ -65,6 +65,11 @@ static void *ungif_calloc( size_t num, size_t sz )
     return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, num*sz );
 }
 
+static void *ungif_realloc( void *ptr, size_t sz )
+{
+    return HeapReAlloc( GetProcessHeap(), 0, ptr, sz );
+}
+
 static void ungif_free( void *ptr )
 {
     HeapFree( GetProcessHeap(), 0, ptr );
@@ -194,7 +199,7 @@ AddExtensionBlock(SavedImage * New,
     if (New->ExtensionBlocks == NULL)
         New->ExtensionBlocks = ungif_alloc(sizeof(ExtensionBlock));
     else
-        New->ExtensionBlocks = realloc(New->ExtensionBlocks,
+        New->ExtensionBlocks = ungif_realloc(New->ExtensionBlocks,
                                       sizeof(ExtensionBlock) *
                                       (New->ExtensionBlockCount + 1));
 
@@ -387,7 +392,7 @@ DGifGetImageDesc(GifFileType * GifFile) {
     }
 
     if (GifFile->SavedImages) {
-        if ((GifFile->SavedImages = realloc(GifFile->SavedImages,
+        if ((GifFile->SavedImages = ungif_realloc(GifFile->SavedImages,
                                       sizeof(SavedImage) *
                                       (GifFile->ImageCount + 1))) == NULL) {
             return GIF_ERROR;




More information about the wine-cvs mailing list