svn commit: r357748 - stable/12/sys/kern

Mark Johnston markj at FreeBSD.org
Tue Feb 11 03:37:43 UTC 2020


Author: markj
Date: Tue Feb 11 03:37:42 2020
New Revision: 357748
URL: https://svnweb.freebsd.org/changeset/base/357748

Log:
  MFC r357525:
  Correct the malloc tag used when freeing the temporary semop(2) buffer.

Modified:
  stable/12/sys/kern/sysv_sem.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/sysv_sem.c
==============================================================================
--- stable/12/sys/kern/sysv_sem.c	Tue Feb 11 00:43:58 2020	(r357747)
+++ stable/12/sys/kern/sysv_sem.c	Tue Feb 11 03:37:42 2020	(r357748)
@@ -1142,7 +1142,7 @@ sys_semop(struct thread *td, struct semop_args *uap)
 		DPRINTF(("error = %d from copyin(%p, %p, %d)\n", error,
 		    uap->sops, sops, nsops * sizeof(sops[0])));
 		if (sops != small_sops)
-			free(sops, M_SEM);
+			free(sops, M_TEMP);
 		return (error);
 	}
 
@@ -1393,7 +1393,7 @@ done:
 done2:
 	mtx_unlock(sema_mtxp);
 	if (sops != small_sops)
-		free(sops, M_SEM);
+		free(sops, M_TEMP);
 	return (error);
 }
 


More information about the svn-src-all mailing list