summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2010-09-17 18:25:48 -0400
committerNathan Kinder <nkinder@redhat.com>2010-09-20 08:15:01 -0700
commit62cc84cec98c46d5792178d483f8780d43537d0a (patch)
tree7713de6b22a6d32debb1f07864f406e1f58b5062
parente84ef2eceaeaae02acf62b74b37be8e9b2ac59bc (diff)
downloadds-62cc84cec98c46d5792178d483f8780d43537d0a.tar.gz
ds-62cc84cec98c46d5792178d483f8780d43537d0a.tar.xz
ds-62cc84cec98c46d5792178d483f8780d43537d0a.zip
Bug 630092 - Coverity #11992,11993: Resource leaks issues
https://bugzilla.redhat.com/show_bug.cgi?id=630092 Description: The acl_Parse() has been modified to release newacls and newaclv when an error occurs.
-rw-r--r--lib/libaccess/acl.tab.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libaccess/acl.tab.cpp b/lib/libaccess/acl.tab.cpp
index 5f6610d9..ddf40a6d 100644
--- a/lib/libaccess/acl.tab.cpp
+++ b/lib/libaccess/acl.tab.cpp
@@ -846,7 +846,11 @@ int acl_Parse()
aclv = ACLCOPY(newaclv, aclv, ACLSTYPE);
}
else
+ {
aclnewmax = 0; /* failed */
+ if (newacls) PERM_FREE(newacls);
+ if (newaclv) PERM_FREE(newaclv);
+ }
}
else /* not first time */
{