Bugs item #442406, was opened at 2001-07-18 06:37
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=111050&aid=442406&group_id=11050

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Malcolm Rodgers (mowie_x)
Assigned to: Nobody/Anonymous (nobody)
Summary: Memory Leak detected via mpatrol

Initial Comment:

I've linked avifile library version 0.6 into my
project, and am getting
memory leaks reported by mpatrol at the following
locations.  Could you
please
let me know if these are known-leaks, and if they are
being looked at?  

MEMORY LEAK 1
========================================
 0x080C72DC (8 bytes) {operator new[]:200:0}
[1024|__10LDT_Keeper|/avifile-0.6/lib/common/ldt_keeper.cpp|198]
        0x400FD2A1 __10LDT_Keeper+225 at
/avifile-0.6/lib/common/ldt_keeper.cpp:198
        0x400FD347
__static_initialization_and_destruction_0+55 at
/avifile-0.6/lib/common/ldt_keeper.cpp:208
        0x400FD392
__static_initialization_and_destruction_0+130 at
/avifile-0.6/lib/common/ldt_keeper.cpp:208
        0x400FDFA5 __do_global_ctors_aux+49
        0x4000DAC2 _dl_init+306 at
/export/home/chmou/rpm/BUILD/glibc-2.2.2/elf/dl-init.c:70
        0x40001DF1 _dl_start_user+58

This means there is a leak in ldt_keeper.cpp at line
198 of 8 bytes
  prev_struct=new char[8];
    *(void**)array.base_addr=prev_struct;
    close(fd);
}

The above are lines 198,199,200

MEMORY LEAK 2
=====================================================
 0x081D5650 (20 bytes) {realloc:251:0}
[1024|RegisterComClass|
/avifile-0.6/plugins/libwin32/loader/win32.c|2098]
        0x40067778 RegisterComClass+88 at
/avifile-0.6/plugins/libwin32/loader/win32.c:2098
        0x40072EBC __15AllocatorKeeper+44 at
/avifile-0.6/plugins/libwin32/DirectShow/allocator.cpp:12
        0x40056FB1
__static_initialization_and_destruction_0+49 at
/avifile-0.6/plugins/libwin32/DirectShow/allocator.h:15
        0x40057065
__static_initialization_and_destruction_0+229 at
/avifile-0.6/plugins/libwin32/DirectShow/allocator.h:13
        0x4006E025 __do_global_ctors_aux+49
        0x4000DAC2 _dl_init+306 at
/export/home/chmou/rpm/BUILD/glibc-2.2.2/elf/dl-init.c:70
        0x40001DF1 _dl_start_user+58

This means there is a leak of 20 bytes at win32.c line
2098
Line 2098 is the realloc line from below:

static struct COM_OBJECT_INFO* com_object_table=0;
static int com_object_size=0;
int RegisterComClass(GUID* clsid, GETCLASSOBJECT gcs)
{
    if(!clsid)return -1;
    if(!gcs)return -1;
    com_object_table=realloc(com_object_table,
sizeof(struct
COM_OBJECT_INFO)*(++com_object_size));
   
com_object_table[com_object_size-1].clsid=*clsid;        
   
com_object_table[com_object_size-1].GetClassObject=gcs;
    return 0;        
}

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=111050&aid=442406&group_id=11050

_______________________________________________
Avifile mailing list
[EMAIL PROTECTED]
http://prak.org/mailman/listinfo/avifile

Reply via email to