|
|
688d36 |
From f413ee60dcd538603f0db608899799113fba053f Mon Sep 17 00:00:00 2001
|
|
|
688d36 |
From: Sumit Bose <sbose@redhat.com>
|
|
|
688d36 |
Date: Tue, 14 Aug 2018 14:09:48 +0200
|
|
|
688d36 |
Subject: [PATCH] Fix issues found by Coverity
|
|
|
688d36 |
|
|
|
688d36 |
---
|
|
|
688d36 |
service/realm-kerberos.c | 5 ++++-
|
|
|
688d36 |
service/realm-packages.c | 2 +-
|
|
|
688d36 |
2 files changed, 5 insertions(+), 2 deletions(-)
|
|
|
688d36 |
|
|
|
688d36 |
diff --git a/service/realm-kerberos.c b/service/realm-kerberos.c
|
|
|
688d36 |
index d6d109f..252e256 100644
|
|
|
688d36 |
--- a/service/realm-kerberos.c
|
|
|
688d36 |
+++ b/service/realm-kerberos.c
|
|
|
688d36 |
@@ -980,7 +980,10 @@ realm_kerberos_set_details (RealmKerberos *self,
|
|
|
688d36 |
if (name == NULL)
|
|
|
688d36 |
break;
|
|
|
688d36 |
value = va_arg (va, const gchar *);
|
|
|
688d36 |
- g_return_if_fail (value != NULL);
|
|
|
688d36 |
+ if (value == NULL) {
|
|
|
688d36 |
+ va_end (va);
|
|
|
688d36 |
+ g_return_if_reached ();
|
|
|
688d36 |
+ }
|
|
|
688d36 |
|
|
|
688d36 |
values[0] = g_variant_new_string (name);
|
|
|
688d36 |
values[1] = g_variant_new_string (value);
|
|
|
688d36 |
diff --git a/service/realm-packages.c b/service/realm-packages.c
|
|
|
688d36 |
index 9a6984c..5976439 100644
|
|
|
688d36 |
--- a/service/realm-packages.c
|
|
|
688d36 |
+++ b/service/realm-packages.c
|
|
|
688d36 |
@@ -567,7 +567,7 @@ lookup_required_files_and_packages (const gchar **package_sets,
|
|
|
688d36 |
g_ptr_array_add (packages, NULL);
|
|
|
688d36 |
*result_packages = (gchar **)g_ptr_array_free (packages, FALSE);
|
|
|
688d36 |
} else {
|
|
|
688d36 |
- g_ptr_array_free (files, TRUE);
|
|
|
688d36 |
+ g_ptr_array_free (packages, TRUE);
|
|
|
688d36 |
}
|
|
|
688d36 |
|
|
|
688d36 |
if (result_files) {
|
|
|
688d36 |
--
|
|
|
688d36 |
2.17.1
|
|
|
688d36 |
|