mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
Fix memory leak
This commit is contained in:
parent
249abcd108
commit
e7bed050bc
@ -109,11 +109,11 @@ struct RDIR *retro_opendir(const char *name)
|
||||
struct RDIR *rdir = (struct RDIR*)calloc(1, sizeof(*rdir));
|
||||
|
||||
if (!rdir||!name)
|
||||
{
|
||||
if (rdir)
|
||||
free(rdir);
|
||||
return NULL;
|
||||
|
||||
/* Handle empty string as current dir */
|
||||
if (*name==0)
|
||||
name=".";
|
||||
}
|
||||
|
||||
#if defined(_WIN32)
|
||||
(void)path_wide;
|
||||
|
Loading…
x
Reference in New Issue
Block a user