sysml / clickos

The Click modular router: fast modular packet processing and analysis
http://www.read.cs.ucla.edu/click/
Other
136 stars 35 forks source link

Fix a bug: a string created by "new" should destroyed by "delete" #42

Closed Feng23 closed 7 years ago

Feng23 commented 7 years ago

Fix a bug: a string created by "operator new" should be destroyed by "delete"

I found this bug when I configured with --enable-dmalloc which will alloc memory with an extra chunk at the beginning of the allocated memory for tracking memory usage when calling "operator new" and "operator new[]". This bug causes minios crash since "free" gets a parameter which is not the beginning address of the allocated memory.

yvolchkov commented 7 years ago

Thanks! Merged with slightly modified commit message