-/* $OpenBSD: sysv_msg.c,v 1.30 2014/12/19 05:59:21 tedu Exp $ */
+/* $OpenBSD: sysv_msg.c,v 1.31 2015/10/07 14:49:04 deraadt Exp $ */
/* $NetBSD: sysv_msg.c,v 1.19 1996/02/09 19:00:18 christos Exp $ */
/*
* Copyright (c) 2009 Bret S. Lambert <blambert@openbsd.org>
/* if malloc slept, a queue with the same key may have been created */
if (que_key_lookup(key)) {
- free(que, M_TEMP, 0);
+ free(que, M_TEMP, sizeof *que);
return (NULL);
}
TAILQ_REMOVE(&que->que_msgs, msg, msg_next);
msg_free(msg);
}
- free(que, M_TEMP, 0);
+ free(que, M_TEMP, sizeof *que);
num_ques--;
}
-/* $OpenBSD: sysv_shm.c,v 1.66 2015/03/14 03:38:50 jsg Exp $ */
+/* $OpenBSD: sysv_shm.c,v 1.67 2015/10/07 14:49:04 deraadt Exp $ */
/* $NetBSD: sysv_shm.c,v 1.50 1998/10/21 22:24:29 tron Exp $ */
/*
M_WAITOK|M_ZERO);
memcpy(newseqs, shmseqs,
shminfo.shmmni * sizeof(unsigned short));
- free(shmseqs, M_SHM, 0);
+ free(shmseqs, M_SHM, shminfo.shmmni * sizeof(unsigned short));
shmseqs = newseqs;
shminfo.shmmni = val;
return (0);