Use ast_strdupa() instead of strdup(), thanks to sergee