artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f993d4
)
Handle the case in freechunks where not a single allocation has happened.
author
otto
<otto@openbsd.org>
Sun, 13 Feb 2022 20:02:30 +0000
(20:02 +0000)
committer
otto
<otto@openbsd.org>
Sun, 13 Feb 2022 20:02:30 +0000
(20:02 +0000)
ok deraadt@
lib/libpcap/gencode.c
patch
|
blob
|
history
diff --git
a/lib/libpcap/gencode.c
b/lib/libpcap/gencode.c
index
1a64216
..
d15f174
100644
(file)
--- a/
lib/libpcap/gencode.c
+++ b/
lib/libpcap/gencode.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: gencode.c,v 1.
59 2021/12/05 16:40:24 deraadt Exp $
*/
+/* $OpenBSD: gencode.c,v 1.
60 2022/02/13 20:02:30 otto Exp $
*/
/*
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
@@
-205,6
+205,8
@@
freechunks(void)
int i, j;
for (i = 0; i <= cur_membag; i++) {
+ if (membag[i].ptrs == NULL)
+ continue;
for (j = 0; j <= membag[i].slot; j++)
free(membag[i].ptrs[j]);
free(membag[i].ptrs);