Changed methods in substr methods to use strdup() and freed memory in nwapi::Tray::{Create,SetIcon}()