Gitweb:
http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=d8825398b6b...
Commit: d8825398b6b75f988b86bec0b5a76aab45f16da5
Parent: 113888ed16483827c9119861e3cccb975bfd523a
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Sun Jun 22 20:54:06 2014 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Sun Jun 22 21:12:51 2014 -0400
rgmanager: Don't crash if a resource agent does not specify a primary attribute
Fix a crash that would occur if an errant resource agent did not specify a
primary attribute.
Resolves: rhbz#1018079
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/daemons/reslist.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/daemons/reslist.c b/rgmanager/src/daemons/reslist.c
index e1695fb..2a50f17 100644
--- a/rgmanager/src/daemons/reslist.c
+++ b/rgmanager/src/daemons/reslist.c
@@ -260,6 +260,9 @@ find_resource_by_ref(resource_t **reslist, const char *type, const
char *ref)
resource_t *first_possible = NULL;
int x, flags = RA_UNIQUE|RA_REQUIRED;
+ if (!ref)
+ return NULL;
+
list_do(reslist, curr) {
if (strcmp(curr->r_rule->rr_type, type))
continue;