diff options
author | Robert Watson <rwatson@FreeBSD.org> | 2007-05-27 17:02:54 +0000 |
---|---|---|
committer | Robert Watson <rwatson@FreeBSD.org> | 2007-05-27 17:02:54 +0000 |
commit | b312d4b0ba53bf3b51348c039b7731a0dca9d9e8 (patch) | |
tree | 786e5a2aba0a863f8dde3ca1828eb4a3f9f116d3 /sys/netinet/tcp_subr.c | |
parent | db7275797330ddc1b8c9866c11fb218bc388b422 (diff) | |
download | src-b312d4b0ba53bf3b51348c039b7731a0dca9d9e8.tar.gz src-b312d4b0ba53bf3b51348c039b7731a0dca9d9e8.zip |
Don't assign sp to the value of s when we're about to assign it instead to
s + strlen(s).
Found with: Coverity Prevent(tm)
CID: 2243
Notes
Notes:
svn path=/head/; revision=170019
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 500a00db4a1c..2f300d5b4667 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2101,7 +2101,7 @@ tcp_log_addrs(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr, 2 * INET_ADDRSTRLEN; #endif /* INET6 */ - s = sp = malloc(size, M_TCPLOG, (M_ZERO|M_NOWAIT)); + s = malloc(size, M_TCPLOG, M_ZERO|M_NOWAIT); if (s == NULL) return (NULL); |