@@ -1113,7 +1113,7 @@ void EndDrawing(void)
1113
1113
unsigned char * screenData = rlReadScreenPixels (screenWidth , screenHeight );
1114
1114
GifWriteFrame (screenData , screenWidth , screenHeight , 10 , 8 , false);
1115
1115
1116
- free (screenData ); // Free image data
1116
+ RL_FREE (screenData ); // Free image data
1117
1117
}
1118
1118
1119
1119
if (((gifFramesCounter /15 )%2 ) == 1 )
@@ -1595,7 +1595,7 @@ void TakeScreenshot(const char *fileName)
1595
1595
#endif
1596
1596
1597
1597
ExportImage (image , path );
1598
- free (imgData );
1598
+ RL_FREE (imgData );
1599
1599
1600
1600
#if defined(PLATFORM_WEB )
1601
1601
// Download file from MEMFS (emscripten memory filesystem)
@@ -1742,8 +1742,8 @@ char **GetDirectoryFiles(const char *dirPath, int *fileCount)
1742
1742
ClearDirectoryFiles ();
1743
1743
1744
1744
// Memory allocation for MAX_DIRECTORY_FILES
1745
- dirFilesPath = (char * * )malloc (sizeof (char * )* MAX_DIRECTORY_FILES );
1746
- for (int i = 0 ; i < MAX_DIRECTORY_FILES ; i ++ ) dirFilesPath [i ] = (char * )malloc (sizeof (char )* MAX_FILEPATH_LENGTH );
1745
+ dirFilesPath = (char * * )RL_MALLOC (sizeof (char * )* MAX_DIRECTORY_FILES );
1746
+ for (int i = 0 ; i < MAX_DIRECTORY_FILES ; i ++ ) dirFilesPath [i ] = (char * )RL_MALLOC (sizeof (char )* MAX_FILEPATH_LENGTH );
1747
1747
1748
1748
int counter = 0 ;
1749
1749
struct dirent * ent ;
@@ -1776,9 +1776,9 @@ void ClearDirectoryFiles(void)
1776
1776
{
1777
1777
if (dirFilesCount > 0 )
1778
1778
{
1779
- for (int i = 0 ; i < dirFilesCount ; i ++ ) free (dirFilesPath [i ]);
1779
+ for (int i = 0 ; i < dirFilesCount ; i ++ ) RL_FREE (dirFilesPath [i ]);
1780
1780
1781
- free (dirFilesPath );
1781
+ RL_FREE (dirFilesPath );
1782
1782
dirFilesCount = 0 ;
1783
1783
}
1784
1784
}
@@ -1808,9 +1808,9 @@ void ClearDroppedFiles(void)
1808
1808
{
1809
1809
if (dropFilesCount > 0 )
1810
1810
{
1811
- for (int i = 0 ; i < dropFilesCount ; i ++ ) free (dropFilesPath [i ]);
1811
+ for (int i = 0 ; i < dropFilesCount ; i ++ ) RL_FREE (dropFilesPath [i ]);
1812
1812
1813
- free (dropFilesPath );
1813
+ RL_FREE (dropFilesPath );
1814
1814
1815
1815
dropFilesCount = 0 ;
1816
1816
}
@@ -1925,7 +1925,7 @@ void OpenURL(const char *url)
1925
1925
}
1926
1926
else
1927
1927
{
1928
- char * cmd = (char * )calloc (strlen (url ) + 10 , sizeof (char ));
1928
+ char * cmd = (char * )RL_CALLOC (strlen (url ) + 10 , sizeof (char ));
1929
1929
1930
1930
#if defined(_WIN32 )
1931
1931
sprintf (cmd , "explorer %s" , url );
@@ -1935,7 +1935,7 @@ void OpenURL(const char *url)
1935
1935
sprintf (cmd , "open '%s'" , url );
1936
1936
#endif
1937
1937
system (cmd );
1938
- free (cmd );
1938
+ RL_FREE (cmd );
1939
1939
}
1940
1940
}
1941
1941
@@ -3455,11 +3455,11 @@ static void WindowDropCallback(GLFWwindow *window, int count, const char **paths
3455
3455
{
3456
3456
ClearDroppedFiles ();
3457
3457
3458
- dropFilesPath = (char * * )malloc (sizeof (char * )* count );
3458
+ dropFilesPath = (char * * )RL_MALLOC (sizeof (char * )* count );
3459
3459
3460
3460
for (int i = 0 ; i < count ; i ++ )
3461
3461
{
3462
- dropFilesPath [i ] = (char * )malloc (sizeof (char )* MAX_FILEPATH_LENGTH );
3462
+ dropFilesPath [i ] = (char * )RL_MALLOC (sizeof (char )* MAX_FILEPATH_LENGTH );
3463
3463
strcpy (dropFilesPath [i ], paths [i ]);
3464
3464
}
3465
3465
0 commit comments