Sorry ...
I forgot to add modify else ...
You're code line should be exchanged for this one:
void * temp = ( FirewallRule * ) realloc( programs[ id ].firewallRules, ( rulesCount + 1 ) * sizeof( FirewallRule ) );
HIH (Hope it helped!)
Cheers,
Joe
Hi there,
why you keep reallocating everytime you add a new firewall rule ?
Just to keep the list together as an array?
I mean:
Each program has its own rules list (you already have a rule count) which grows dinamically. For that, you need to make some changes on your structures:
1) Add field...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.