svn commit: r333991 - stable/11/sys/dev/ocs_fc

Kenneth D. Merry ken at FreeBSD.org
Mon May 21 18:59:35 UTC 2018


Author: ken
Date: Mon May 21 18:59:34 2018
New Revision: 333991
URL: https://svnweb.freebsd.org/changeset/base/333991

Log:
  MFC r333492:
    ------------------------------------------------------------------------
    r333492 | ken | 2018-05-11 08:50:26 -0600 (Fri, 11 May 2018) | 10 lines
  
    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
  
    ------------------------------------------------------------------------
  
  Approved by:	re (marius, gjb)

Modified:
  stable/11/sys/dev/ocs_fc/ocs_os.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/ocs_fc/ocs_os.c
==============================================================================
--- stable/11/sys/dev/ocs_fc/ocs_os.c	Mon May 21 18:41:16 2018	(r333990)
+++ stable/11/sys/dev/ocs_fc/ocs_os.c	Mon May 21 18:59:34 2018	(r333991)
@@ -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);


More information about the svn-src-stable-11 mailing list