Index: uspace/lib/ui/src/pbutton.c
===================================================================
--- uspace/lib/ui/src/pbutton.c	(revision 7cc30e98a2b4441f4a5ddaa86d0a54c7ac71fab8)
+++ uspace/lib/ui/src/pbutton.c	(revision 88d828ea8145b6317bdb4b2f22c2e10fea2fc086)
@@ -114,4 +114,5 @@
 
 	ui_control_delete(pbutton->control);
+	free(pbutton->caption);
 	free(pbutton);
 }
@@ -183,4 +184,23 @@
 {
 	pbutton->isdefault = isdefault;
+}
+
+/** Set push button caption.
+ *
+ * @param pbutton Button
+ * @param caption New caption
+ * @return EOK on success, ENOMEM if out of memory
+ */
+errno_t ui_pbutton_set_caption(ui_pbutton_t *pbutton, const char *caption)
+{
+	char *dcaption;
+
+	dcaption = str_dup(caption);
+	if (dcaption == NULL)
+		return ENOMEM;
+
+	free(pbutton->caption);
+	pbutton->caption = dcaption;
+	return EOK;
 }
 
