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

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