From: Andre Noll Date: Sun, 21 Dec 2014 14:35:19 +0000 (+0000) Subject: aft.c: Don't call osl_close_disk_object() on failure. X-Git-Tag: v0.5.4~3^2~2 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=b6161b3a38321a3d6fb019f71f9a00d71e105f5d aft.c: Don't call osl_close_disk_object() on failure. If osl_open_disk_object() fails, we branch to the "err" label where osl_close_disk_object() is called although no disk object exists. Fix this by simply returning the osl error code in this case. --- diff --git a/aft.c b/aft.c index df34fa14..61fd9942 100644 --- a/aft.c +++ b/aft.c @@ -1109,7 +1109,7 @@ int open_and_update_audio_file(struct osl_row *aft_row, long score, ret = osl(osl_open_disk_object(audio_file_table, aft_row, AFTCOL_CHUNKS, &chunk_table_obj)); if (ret < 0) - goto err; + return ret; ret = mmap_full_file(path, O_RDONLY, &map.data, &map.size, &afd->fd); if (ret < 0)