|
|
803fb7 |
From 86592a27154d8da0e695304a75ae1458c574c962 Mon Sep 17 00:00:00 2001
|
|
|
803fb7 |
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
|
|
|
803fb7 |
Date: Tue, 24 Feb 2015 20:40:07 +0100
|
|
|
803fb7 |
Subject: [PATCH] acl-util: avoid freeing uninitialized pointer
|
|
|
803fb7 |
|
|
|
803fb7 |
CID#1271344/1271345
|
|
|
803fb7 |
|
|
|
803fb7 |
(cherry picked from commit 76dcbc4992e895a377aad26f8c4a0dcd71002396)
|
|
|
803fb7 |
---
|
|
|
803fb7 |
src/shared/acl-util.c | 4 ++--
|
|
|
803fb7 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
803fb7 |
|
|
|
803fb7 |
diff --git a/src/shared/acl-util.c b/src/shared/acl-util.c
|
|
|
803fb7 |
index cbe09d7ab..e67e9acb6 100644
|
|
|
803fb7 |
--- a/src/shared/acl-util.c
|
|
|
803fb7 |
+++ b/src/shared/acl-util.c
|
|
|
803fb7 |
@@ -302,7 +302,7 @@ static int acl_entry_equal(acl_entry_t a, acl_entry_t b) {
|
|
|
803fb7 |
/* can have only one of those */
|
|
|
803fb7 |
return true;
|
|
|
803fb7 |
case ACL_USER: {
|
|
|
803fb7 |
- _cleanup_(acl_free_uid_tpp) uid_t *uid_a, *uid_b;
|
|
|
803fb7 |
+ _cleanup_(acl_free_uid_tpp) uid_t *uid_a = NULL, *uid_b = NULL;
|
|
|
803fb7 |
|
|
|
803fb7 |
uid_a = acl_get_qualifier(a);
|
|
|
803fb7 |
if (!uid_a)
|
|
|
803fb7 |
@@ -315,7 +315,7 @@ static int acl_entry_equal(acl_entry_t a, acl_entry_t b) {
|
|
|
803fb7 |
return *uid_a == *uid_b;
|
|
|
803fb7 |
}
|
|
|
803fb7 |
case ACL_GROUP: {
|
|
|
803fb7 |
- _cleanup_(acl_free_gid_tpp) gid_t *gid_a, *gid_b;
|
|
|
803fb7 |
+ _cleanup_(acl_free_gid_tpp) gid_t *gid_a = NULL, *gid_b = NULL;
|
|
|
803fb7 |
|
|
|
803fb7 |
gid_a = acl_get_qualifier(a);
|
|
|
803fb7 |
if (!gid_a)
|