From 402bda88d8556619738ebde95cbcacac2e9f1169 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 22 Dec 2015 15:36:45 +0000 Subject: [PATCH] aft.c: Check for osl errors in com_add_callback(). We only want to issue the afs event if the row was successfully added to the audio file table. --- aft.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aft.c b/aft.c index 7f9e786c..f5830dac 100644 --- a/aft.c +++ b/aft.c @@ -1745,6 +1745,8 @@ static int com_add_callback(struct afs_callback_arg *aca) objs[AFTCOL_AFSI].size = AFSI_SIZE; save_afsi(&default_afsi, &objs[AFTCOL_AFSI]); ret = osl(osl_add_and_get_row(audio_file_table, objs, &aft_row)); + if (ret < 0) + goto out; ret = afs_event(AUDIO_FILE_ADD, &aca->pbout, aft_row); out: if (ret < 0) -- 2.39.5