Blob Blame History Raw
From 12a6af187dec7b0c229673958dd0916e2479584e Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Mon, 26 Jun 2017 18:39:30 -0500
Subject: [PATCH 1/2] Low: pengine: avoid use of NULL

---
 pengine/clone.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pengine/clone.c b/pengine/clone.c
index 28f368e..1722166 100644
--- a/pengine/clone.c
+++ b/pengine/clone.c
@@ -868,7 +868,7 @@ clone_create_pseudo_actions(
     if (stop_notify != NULL && *stop_notify == NULL) {
         *stop_notify = create_notification_boundaries(rsc, RSC_STOP, stop, stopped, data_set);
 
-        if (*stop_notify && *start_notify) {
+        if (start_notify && *start_notify && *stop_notify) {
             order_actions((*stop_notify)->post_done, (*start_notify)->pre, pe_order_optional);
         }
     }
-- 
1.8.3.1


From 4882ac112253f1f3afece01eb2e32a87b6d3689e Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Tue, 27 Jun 2017 11:11:45 -0500
Subject: [PATCH 2/2] Low: libpe_status: avoid use-after-free

---
 lib/pengine/container.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/pengine/container.c b/lib/pengine/container.c
index 5d4e697..a21f0a4 100644
--- a/lib/pengine/container.c
+++ b/lib/pengine/container.c
@@ -1035,9 +1035,9 @@ tuple_free(container_grouping_t *tuple)
     }
 
     if(tuple->ip) {
-        tuple->ip->fns->free(tuple->ip);
-        tuple->ip->xml = NULL;
         free_xml(tuple->ip->xml);
+        tuple->ip->xml = NULL;
+        tuple->ip->fns->free(tuple->ip);
         tuple->ip = NULL;
     }
     if(tuple->docker) {
-- 
1.8.3.1