-/* $OpenBSD: est.c,v 1.48 2016/03/07 05:32:46 naddy Exp $ */
+/* $OpenBSD: est.c,v 1.49 2018/02/16 14:42:29 fcambus Exp $ */
/*
* Copyright (c) 2003 Michael Eriksson.
* All rights reserved.
needtran = 0;
}
- free(est_fqlist->table, M_DEVBUF, 0);
+ free(est_fqlist->table, M_DEVBUF, npss * sizeof(struct est_op));
free(est_fqlist, M_DEVBUF, sizeof *est_fqlist);
est_fqlist = acpilist;
if ((fake_table = mallocarray(3, sizeof(struct est_op),
M_DEVBUF, M_NOWAIT)) == NULL) {
- free(fake_fqlist, M_DEVBUF, 0);
+ free(fake_fqlist, M_DEVBUF, sizeof(struct fqlist));
printf("%s: EST: cannot allocate memory for fake "
"table\n", cpu_device);
return;
* it can't fail in that case and therefore can't reach here.
*/
free(est_fqlist->table, M_DEVBUF, 0);
- free(est_fqlist, M_DEVBUF, 0);
+ free(est_fqlist, M_DEVBUF, sizeof(*est_fqlist));
}
void