Fix memory leak
This commit is contained in:
parent
c29c48bacf
commit
b51a19da5c
1 changed files with 4 additions and 2 deletions
|
@ -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,
|
||||
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;
|
||||
int32_t offset = 0;
|
||||
int rv = 0;
|
||||
|
@ -191,6 +192,7 @@ static int cue_get_serial(database_state_handle_t *db_state,
|
|||
RARCH_LOG("%s: %s\n",
|
||||
msg_hash_to_str(MSG_COULD_NOT_FIND_VALID_DATA_TRACK),
|
||||
strerror(-rv));
|
||||
free(track_path);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue