mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-26 05:02:18 +00:00
Fix the build on systems with malloc debugging enabled by making sure
a struct is properly initialized to 0.
This commit is contained in:
parent
60b3a84279
commit
cd16c16ac8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=184750
10
net/wireshark/files/patch-tools_lemon_lemon.c
Normal file
10
net/wireshark/files/patch-tools_lemon_lemon.c
Normal file
@ -0,0 +1,10 @@
|
||||
--- tools/lemon/lemon.c.orig Sat Feb 10 01:09:11 2007
|
||||
+++ tools/lemon/lemon.c Sat Feb 10 01:09:33 2007
|
||||
@@ -2146,6 +2146,7 @@ to follow the previous rule.");
|
||||
struct rule *rp;
|
||||
rp = (struct rule *)malloc( sizeof(struct rule) +
|
||||
sizeof(struct symbol*)*psp->nrhs + sizeof(char*)*psp->nrhs );
|
||||
+ memset(rp, 0, sizeof(struct rule));
|
||||
if( rp==0 ){
|
||||
ErrorMsg(psp->filename,psp->tokenlineno,
|
||||
"Can't allocate enough memory for this rule.");
|
Loading…
Reference in New Issue
Block a user