summaryrefslogtreecommitdiff
path: root/os/log.c
diff options
context:
space:
mode:
authorCyril Brulebois <kibi@debian.org>2010-11-08 23:35:33 +0100
committerPeter Hutterer <peter.hutterer@who-t.net>2010-11-11 08:29:54 +1000
commitb142b0d27442191d628762604f4eb1f65263d717 (patch)
tree502f7f92f01a5ecf8301bc5bf41555934896d128 /os/log.c
parent0649ac0afdb3f8ed11c2634563d6b9df161cb9ec (diff)
Remove more superfluous if(p!=NULL) checks around free(p).
This patch has been generated by the following Coccinelle semantic patch: @@ expression E; @@ - if (E != NULL) - free(E); + free(E); Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'os/log.c')
-rw-r--r--os/log.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/os/log.c b/os/log.c
index ee4b45fa4..7d1078355 100644
--- a/os/log.c
+++ b/os/log.c
@@ -489,8 +489,7 @@ AuditFlush(OsTimerPtr timer, CARD32 now, pointer arg)
ErrorF("%slast message repeated %d times\n",
prefix != NULL ? prefix : "", nrepeat);
nrepeat = 0;
- if (prefix != NULL)
- free(prefix);
+ free(prefix);
return AUDIT_TIMEOUT;
} else {
/* if the timer expires without anything to print, flush the message */
@@ -523,8 +522,7 @@ VAuditF(const char *f, va_list args)
nrepeat = 0;
auditTimer = TimerSet(auditTimer, 0, AUDIT_TIMEOUT, AuditFlush, NULL);
}
- if (prefix != NULL)
- free(prefix);
+ free(prefix);
}
void