[gnome-software] trivial: Fix up a potential NULL dereference
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Fix up a potential NULL dereference
- Date: Tue, 10 Sep 2013 09:54:53 +0000 (UTC)
commit 949bac6e8dd27a07e0b4d44199b741ff8bf50b6b
Author: Richard Hughes <richard hughsie com>
Date: Tue Sep 10 10:27:28 2013 +0100
trivial: Fix up a potential NULL dereference
Spotted by clang...
src/plugins/appstream-cache.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/appstream-cache.c b/src/plugins/appstream-cache.c
index baa6f5a..5c9fe40 100644
--- a/src/plugins/appstream-cache.c
+++ b/src/plugins/appstream-cache.c
@@ -552,7 +552,7 @@ appstream_cache_parse_file (AppstreamCache *cache,
if (len < 0)
ret = FALSE;
out:
- if (helper->item_temp)
+ if (helper != NULL && helper->item_temp != NULL)
appstream_app_free (helper->item_temp);
if (info != NULL)
g_object_unref (info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]