Blame SOURCES/audit-3.0-clang-warnings.patch

bcda57
commit b4b63a18e044e507b9091f01aef91d4b3beff97d
bcda57
Author: Steve Grubb <sgrubb@redhat.com>
bcda57
Date:   Mon Nov 4 16:54:44 2019 -0500
bcda57
bcda57
    Fix 2 clang reported warnings
bcda57
bcda57
diff --git a/audisp/plugins/syslog/audisp-syslog.c b/audisp/plugins/syslog/audisp-syslog.c
bcda57
index 2515e0b..9daa021 100644
bcda57
--- a/audisp/plugins/syslog/audisp-syslog.c
bcda57
+++ b/audisp/plugins/syslog/audisp-syslog.c
bcda57
@@ -181,7 +181,7 @@ static inline void write_syslog(char *s)
bcda57
 			mptr = stpcpy(mptr, fval ? fval : "?");
bcda57
 			mptr = stpcpy(mptr, " ");
bcda57
 			rc = auparse_next_field(au);
bcda57
-			if (!header && strcmp(fname, "type") == 0) {
bcda57
+			if (!header && fname && strcmp(fname, "type") == 0) {
bcda57
 				mptr = stpcpy(mptr, "msg=audit(");
bcda57
 
bcda57
 				time_t t = auparse_get_time(au);
bcda57
diff --git a/src/ausearch-lol.c b/src/ausearch-lol.c
bcda57
index 54452e8..e709456 100644
bcda57
--- a/src/ausearch-lol.c
bcda57
+++ b/src/ausearch-lol.c
bcda57
@@ -324,8 +324,11 @@ int lol_add_record(lol *lo, char *buff)
bcda57
 	}
bcda57
 
bcda57
 	// Eat standalone EOE, main event was already marked complete
bcda57
-	if (e.type == AUDIT_EOE)
bcda57
+	if (e.type == AUDIT_EOE) {
bcda57
+		free((char *)e.node);
bcda57
+		free(n.message);
bcda57
 		return 0;
bcda57
+	}
bcda57
 
bcda57
 	// Create new event and fill it in
bcda57
 	l = malloc(sizeof(llist));