File new should return file_t pointer if it exists in the file table.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2022-08-18 11:57:01 +02:00
parent be86197b0b
commit 2df878232b
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -283,7 +283,7 @@ int delete_dynamic_file(file_t *f) {
file_t *file_new(uint16_t fid) {
file_t *f;
if ((f = search_dynamic_file(fid)))
if ((f = search_dynamic_file(fid)) || (f = search_by_fid(fid, NULL, SPECIFY_EF)))
return f;
if (dynamic_files == MAX_DYNAMIC_FILES)
return NULL;