This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix BSD Memory Leak


The attached patch fixes a memory leak in the BSD stack for eCos.  The
accept() call would leak 48 bytes on each call.  The exact number of bytes
leaked could vary on different platforms, as it depends on the amount of
roundup done for alignment issues.  On my platform ARM7TDMI, it was 32 bytes
+ 16 (for roundup).

I also moved the splx(s) statement into the 'else' case of the conditional
compile, since it corresponds with the splx() call in the 'if' portion of
the conditional compile.

Jay Foster
 <<bsd_accept_leak_fix.pat>> 

Attachment: bsd_accept_leak_fix.pat
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]