afc_file_open: fixed memory leak when the object is not found or arguments are invalid.
afc_file_tell: fixed leak of unnecessary buffer and removed condition check before free.