mirror of
https://github.com/libretro/RetroArch
synced 2025-04-22 17:42:47 +00:00
Fix memory leak
This commit is contained in:
parent
c29c48bacf
commit
b51a19da5c
@ -176,7 +176,8 @@ static int iso_get_serial(database_state_handle_t *db_state,
|
|||||||
static int cue_get_serial(database_state_handle_t *db_state,
|
static int cue_get_serial(database_state_handle_t *db_state,
|
||||||
database_info_handle_t *db, const char *name, char* serial)
|
database_info_handle_t *db, const char *name, char* serial)
|
||||||
{
|
{
|
||||||
char *track_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
char *track_path = (char*)malloc(PATH_MAX_LENGTH
|
||||||
|
* sizeof(char));
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int32_t offset = 0;
|
int32_t offset = 0;
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
@ -191,6 +192,7 @@ static int cue_get_serial(database_state_handle_t *db_state,
|
|||||||
RARCH_LOG("%s: %s\n",
|
RARCH_LOG("%s: %s\n",
|
||||||
msg_hash_to_str(MSG_COULD_NOT_FIND_VALID_DATA_TRACK),
|
msg_hash_to_str(MSG_COULD_NOT_FIND_VALID_DATA_TRACK),
|
||||||
strerror(-rv));
|
strerror(-rv));
|
||||||
|
free(track_path);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user