Mercurial > ecos-v2_0-branch
changeset 801:f7102bb4c11d
* src/ecos/support.c (cyg_net_malloc): Honour the M_ZERO
flag. Otherwise we get random junk in places we don't want it.
| author | asl |
|---|---|
| date | Tue, 29 Apr 2003 13:35:52 +0000 |
| parents | d3e7234f6ce8 |
| children | 002e6287d064 |
| files | packages/net/bsd_tcpip/current/ChangeLog packages/net/bsd_tcpip/current/src/ecos/support.c |
| diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/net/bsd_tcpip/current/ChangeLog +++ b/packages/net/bsd_tcpip/current/ChangeLog @@ -1,3 +1,8 @@ +2003-04-29 Andrew Lunn <andrew.lunn@ascom.ch> + + * src/ecos/support.c (cyg_net_malloc): Honour the M_ZERO + flag. Otherwise we get random junk in places we don't want it. + 2003-03-14 Andrew Lunn <andrew.lunn@ascom.ch> * src/sys/net/if.c (if_attach): Removed printf which causes the
--- a/packages/net/bsd_tcpip/current/src/ecos/support.c +++ b/packages/net/bsd_tcpip/current/src/ecos/support.c @@ -201,6 +201,9 @@ cyg_net_malloc(u_long size, int type, in } else { res = cyg_mempool_var_alloc(net_mem, size); } + if ((flags & M_ZERO) && res) { + memset(res,0,size); + } FINISH_STATS(stats_malloc); log(LOG_MDEBUG, "%p\n", res); return (res);
