Re: [acassen/keepalived] 3c7e2c: zalloc use xalloc for consistency
jan <[email protected]>
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
A small bug in lib/memory.c. Think it was more than 10 years I write
that part :)
release of previous memory allocate, calculate wrong size in function
zfree.
should be deleted :
void
xfree(void *p)
{
+ // XXX sizeof p is the size of the pointer, not the pointed
mem_allocated -= sizeof (p);
void
xfree(void *p)
{
+ // XXX sizeof p is the size of the pointer, not the pointed
- mem_allocated -= sizeof (p);
and inserted in line 178
while (i < number_alloc_list) {
if (alloc_list[i].type == 9 && alloc_list[i].ptr == buf) {
if (*
((long *) ((char *) alloc_list[i].ptr +
alloc_list[i].size)) ==
alloc_list[i].csum)
+ mem_allocated -= alloc_list[i].size;
alloc_list[i].type = 0; /* Release */
else {
alloc_list[i].type = 1; /* Overrun */
if (__test_bit(LOG_CONSOLE_BIT, &debug)
2015-04-28 11:49 skrev Alexandre Cassen:
> Branch: refs/heads/master
> Home: https://github.com/acassen/keepalived
> Commit: 3c7e2cf4055c73181aaf9ee401013c2b8d994d09
>
> https://github.com/acassen/keepalived/commit/3c7e2cf4055c73181aaf9ee401013c2b8d994d09
> Author: Alexandre Cassen <[email protected]>
> Date: 2015-04-28 (Tue, 28 Apr 2015)
>
> Changed paths:
> M lib/memory.c
>
> Log Message:
> -----------
> zalloc use xalloc for consistency
>
> Patch from Mickaël Wolff
>
>
> Commit: 85aa2bb880b9bce908f138a720afa3d505b77e70
>
> https://github.com/acassen/keepalived/commit/85aa2bb880b9bce908f138a720afa3d505b77e70
> Author: Alexandre Cassen <[email protected]>
> Date: 2015-04-28 (Tue, 28 Apr 2015)
>
> Changed paths:
> M lib/memory.c
>
> Log Message:
> -----------
> memory: cosmetics
>
> cosmetic lazyness :D
>
>
> Commit: caf619fee63c2848223ddf0ab09096ff0ba62780
>
> https://github.com/acassen/keepalived/commit/caf619fee63c2848223ddf0ab09096ff0ba62780
> Author: Alexandre Cassen <[email protected]>
> Date: 2015-04-28 (Tue, 28 Apr 2015)
>
> Changed paths:
> M keepalived/core/smtp.c
> M keepalived/include/smtp.h
>
> Log Message:
> -----------
> smtp: Fix wrong algorithm in RCPT-TO building
>
> Patch from Mickaël Wolff.
>
>
> Compare:
> https://github.com/acassen/keepalived/compare/9f0998f99a0b...caf619fee63c
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across
> Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable
> Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>
> _______________________________________________
> Keepalived-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/keepalived-devel
--
/Jan Holmberg
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel