You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
1.3 KiB

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