replace strdup() with our cs_strdup(), which call cs_mem_malloc() internally