mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:52:54 +00:00
[CMD]
Fix potential memory leaks svn path=/trunk/; revision=58533
This commit is contained in:
parent
75d957b8e6
commit
c03ac4615e
1 changed files with 11 additions and 5 deletions
|
@ -491,10 +491,16 @@ int __cdecl compare(const void *arg1,const void *arg2)
|
|||
INT ret;
|
||||
|
||||
File1 = cmd_alloc(sizeof(FileName));
|
||||
File2 = cmd_alloc(sizeof(FileName));
|
||||
if(!File1 || !File2)
|
||||
if (!File1)
|
||||
return 0;
|
||||
|
||||
File2 = cmd_alloc(sizeof(FileName));
|
||||
if(!File2)
|
||||
{
|
||||
cmd_free(File1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
memcpy(File1,arg1,sizeof(FileName));
|
||||
memcpy(File2,arg2,sizeof(FileName));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue