summaryrefslogtreecommitdiff
path: root/usr.sbin/iscsid
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-12-05 06:37:25 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-12-05 06:37:25 +0000
commitaf96366a95511f6efad6c3de466c051a4427c19a (patch)
tree93643d22f0e0619c865240d907032434f954fc16 /usr.sbin/iscsid
parent07a2da3e879496514b9c38579743be0791452669 (diff)
Don't check for NULL before free()
Diffstat (limited to 'usr.sbin/iscsid')
-rw-r--r--usr.sbin/iscsid/session.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/iscsid/session.c b/usr.sbin/iscsid/session.c
index ab8c1283069..60ff190b027 100644
--- a/usr.sbin/iscsid/session.c
+++ b/usr.sbin/iscsid/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.7 2014/05/10 11:30:47 claudio Exp $ */
+/* $OpenBSD: session.c,v 1.8 2015/12/05 06:37:24 mmcc Exp $ */
/*
* Copyright (c) 2011 Claudio Jeker <claudio@openbsd.org>
@@ -126,11 +126,9 @@ session_shutdown(struct session *s)
void
session_config(struct session *s, struct session_config *sc)
{
- if (s->config.TargetName)
- free(s->config.TargetName);
+ free(s->config.TargetName);
s->config.TargetName = NULL;
- if (s->config.InitiatorName)
- free(s->config.InitiatorName);
+ free(s->config.InitiatorName);
s->config.InitiatorName = NULL;
s->config = *sc;