commit
6f13733184
|
@ -435,7 +435,7 @@ static int database_info_iterate_serial_lookup(
|
|||
db_state->serial, db_info_entry->serial, db_info_entry->name);
|
||||
#endif
|
||||
if (!strcmp(db_state->serial, db_info_entry->serial))
|
||||
database_info_list_iterate_found_match(db_state, db, NULL);
|
||||
return database_info_list_iterate_found_match(db_state, db, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ static ssize_t get_token(RFILE *fd, char *token, size_t max_len)
|
|||
static int find_token(RFILE *fd, const char *token)
|
||||
{
|
||||
int tmp_len = strlen(token);
|
||||
char *tmp_token = (char*)calloc(tmp_len, 1);
|
||||
char *tmp_token = (char*)calloc(tmp_len+1, 1);
|
||||
|
||||
if (!tmp_token)
|
||||
return -1;
|
||||
|
@ -122,6 +122,8 @@ static int find_token(RFILE *fd, const char *token)
|
|||
return -1;
|
||||
}
|
||||
|
||||
free(tmp_token);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue