[gnome-builder/gnome-builder-3-24] flatpak: perform remove_range() inside of NULL-check
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-24] flatpak: perform remove_range() inside of NULL-check
- Date: Mon, 8 May 2017 22:09:55 +0000 (UTC)
commit 0714c211a1c7df093fbc8b7de7a11939bd6644b0
Author: Christian Hergert <chergert redhat com>
Date: Fri May 5 00:44:44 2017 -0700
flatpak: perform remove_range() inside of NULL-check
Fixes Coverity CID 168632
plugins/flatpak/gbp-flatpak-preferences-addin.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-preferences-addin.c b/plugins/flatpak/gbp-flatpak-preferences-addin.c
index 06d6b46..b390f04 100644
--- a/plugins/flatpak/gbp-flatpak-preferences-addin.c
+++ b/plugins/flatpak/gbp-flatpak-preferences-addin.c
@@ -354,6 +354,8 @@ gbp_flatpak_preferences_addin_reload (GbpFlatpakPreferencesAddin *self)
id = g_array_index (self->ids, guint, i);
ide_preferences_remove_id (self->preferences, id);
}
+
+ g_array_remove_range (self->ids, 0, self->ids->len);
}
task = g_task_new (self, self->cancellable, gbp_flatpak_preferences_addin_reload_cb, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]