use a_strdup
This commit is contained in:
parent
07a5fd6774
commit
c59ecf0127
3
widget.c
3
widget.c
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue