From 20f5b300754a48b96bbf591395001d08b9b32a9a Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 21 Apr 2017 22:54:36 +0200 Subject: [PATCH] aft: Check return value of load_afsi(). This function should never fail, but it does return an error code and all callers except copy_selector_info() check the return value. So let's add the check there as well. --- aft.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aft.c b/aft.c index bfcd1fb0..1afc16bc 100644 --- a/aft.c +++ b/aft.c @@ -2272,7 +2272,9 @@ static int copy_selector_info(__a_unused struct osl_table *table, ret = get_afsi_object_of_row(row, &target_afsi_obj); if (ret < 0) return ret; - load_afsi(&target_afsi, &target_afsi_obj); + ret = load_afsi(&target_afsi, &target_afsi_obj); + if (ret < 0) + return ret; old_afsi = target_afsi; if (cad->flags & CPSI_FLAG_COPY_LYRICS_ID) target_afsi.lyrics_id = cad->source_afsi.lyrics_id; -- 2.39.2