Author: ken Date: Fri May 11 14:50:26 2018 New Revision: 333492 URL: https://svnweb.freebsd.org/changeset/base/333492
Log: Clear out the entire structure, not just the size of a pointer to it. sys/dev/ocs/ocs_os.c: In ocs_thread_create(), use sizeof(*thread) (instead of sizeof(thread)) as the size argument to memset so that we clear out the entire thread structure instead of just a few bytes of it. Submitted by: jtl MFC after: 3 days Modified: head/sys/dev/ocs_fc/ocs_os.c Modified: head/sys/dev/ocs_fc/ocs_os.c ============================================================================== --- head/sys/dev/ocs_fc/ocs_os.c Fri May 11 14:43:21 2018 (r333491) +++ head/sys/dev/ocs_fc/ocs_os.c Fri May 11 14:50:26 2018 (r333492) @@ -630,7 +630,7 @@ ocs_thread_create(ocs_os_handle_t os, ocs_thread_t *th { int32_t rc = 0; - ocs_memset(thread, 0, sizeof(thread)); + ocs_memset(thread, 0, sizeof(*thread)); thread->fctn = fctn; thread->name = ocs_strdup(name); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"