summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux
diff options
context:
space:
mode:
authoreadler <eadler@FreeBSD.org>2013-03-04 02:21:34 +0000
committereadler <eadler@FreeBSD.org>2013-03-04 02:21:34 +0000
commita0bd41720afb55b501ddff2c3bbd7f50a7c0ba1a (patch)
tree9fbde80138cb4e753ffa688e707cb19a0cfa193f /sys/compat/linux
parented67ac528d559ab7d3f138a9f4994fc34c829b6f (diff)
downloadFreeBSD-src-a0bd41720afb55b501ddff2c3bbd7f50a7c0ba1a.zip
FreeBSD-src-a0bd41720afb55b501ddff2c3bbd7f50a7c0ba1a.tar.gz
Remove check for NULL prior to free(9) and m_freem(9).
Approved by: cperciva (mentor)
Diffstat (limited to 'sys/compat/linux')
-rw-r--r--sys/compat/linux/linux_file.c3
-rw-r--r--sys/compat/linux/linux_socket.c6
2 files changed, 3 insertions, 6 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 346d178..7e4ac380 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -517,8 +517,7 @@ eof:
td->td_retval[0] = nbytes - resid;
out:
- if (cookies)
- free(cookies, M_TEMP);
+ free(cookies, M_TEMP);
VOP_UNLOCK(vp, 0);
foffset_unlock(fp, off, 0);
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index cd288f8..36b23ac 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -1443,10 +1443,8 @@ out:
bad:
free(iov, M_IOV);
- if (control != NULL)
- m_freem(control);
- if (linux_cmsg != NULL)
- free(linux_cmsg, M_TEMP);
+ m_freem(control);
+ free(linux_cmsg, M_TEMP);
return (error);
}
OpenPOWER on IntegriCloud