use a_strdup

This commit is contained in:
Julien Danjou 2007-12-23 13:43:12 +01:00
parent 07a5fd6774
commit c59ecf0127
1 changed files with 1 additions and 2 deletions

View File

@ -92,9 +92,8 @@ widget_common_new(Widget *widget, Statusbar *statusbar, cfg_t* config)
widget->statusbar = statusbar; widget->statusbar = statusbar;
name = cfg_title(config); name = cfg_title(config);
widget->name = p_new(char, strlen(name)+1); widget->name = a_strdup(name);
widget->tell = widget_common_tell; widget->tell = widget_common_tell;
strncpy(widget->name, name, strlen(name));
} }
/** Send command to widget /** Send command to widget