Index: uspace/drv/bus/isa/isa.c
===================================================================
--- uspace/drv/bus/isa/isa.c	(revision 5d360624a93a76b37638a8f8649329c5b272ea81)
+++ uspace/drv/bus/isa/isa.c	(revision ef9460bf850bb5bfce022f58b89eb15728aced77)
@@ -352,4 +352,6 @@
 		    str_error(rc));
 	}
+
+	free(id);
 }
 
Index: uspace/drv/bus/pci/pciintel/pci.c
===================================================================
--- uspace/drv/bus/pci/pciintel/pci.c	(revision 5d360624a93a76b37638a8f8649329c5b272ea81)
+++ uspace/drv/bus/pci/pciintel/pci.c	(revision ef9460bf850bb5bfce022f58b89eb15728aced77)
@@ -342,4 +342,6 @@
 	}
 	
+	free(match_id_str);
+	
 	/* TODO add more ids (with subsys ids, using class id etc.) */
 }
Index: uspace/drv/bus/usb/ohci/hc.c
===================================================================
--- uspace/drv/bus/usb/ohci/hc.c	(revision 5d360624a93a76b37638a8f8649329c5b272ea81)
+++ uspace/drv/bus/usb/ohci/hc.c	(revision ef9460bf850bb5bfce022f58b89eb15728aced77)
@@ -151,12 +151,5 @@
 	    "Failed to add OHCI root hub endpoint 0: %s.\n", str_error(ret));
 
-	char *match_str = NULL;
-	/* DDF needs heap allocated string. */
-	ret = asprintf(&match_str, "usb&class=hub");
-	ret = ret > 0 ? 0 : ret;
-	CHECK_RET_RELEASE(ret,
-	    "Failed to create match-id string: %s.\n", str_error(ret));
-
-	ret = ddf_fun_add_match_id(hub_fun, match_str, 100);
+	ret = ddf_fun_add_match_id(hub_fun, "usb&class=hub", 100);
 	CHECK_RET_RELEASE(ret,
 	    "Failed to add root hub match-id: %s.\n", str_error(ret));
Index: uspace/drv/bus/usb/uhci/root_hub.c
===================================================================
--- uspace/drv/bus/usb/uhci/root_hub.c	(revision 5d360624a93a76b37638a8f8649329c5b272ea81)
+++ uspace/drv/bus/usb/uhci/root_hub.c	(revision ef9460bf850bb5bfce022f58b89eb15728aced77)
@@ -50,18 +50,10 @@
 int rh_init(rh_t *instance, ddf_fun_t *fun, uintptr_t reg_addr, size_t reg_size)
 {
+	int ret;
+
 	assert(fun);
 
-	char *match_str = NULL;
-	int ret = asprintf(&match_str, "usb&uhci&root-hub");
-	if (ret < 0) {
-		usb_log_error("Failed to create root hub match string: %s.\n",
-		    str_error(ret));
-		return ret;
-	}
-	assert(match_str);
-
-	ret = ddf_fun_add_match_id(fun, match_str, 100);
+	ret = ddf_fun_add_match_id(fun, "usb&uhci&root-hub", 100);
 	if (ret != EOK) {
-		free(match_str);
 		usb_log_error("Failed to add root hub match id: %s\n",
 		    str_error(ret));
Index: uspace/drv/infrastructure/root/root.c
===================================================================
--- uspace/drv/infrastructure/root/root.c	(revision 5d360624a93a76b37638a8f8649329c5b272ea81)
+++ uspace/drv/infrastructure/root/root.c	(revision ef9460bf850bb5bfce022f58b89eb15728aced77)
@@ -176,4 +176,6 @@
 	}
 
+	free(match_id);
+
 	rc = ddf_fun_bind(fun);
 	if (rc != EOK) {
Index: uspace/drv/test/test1/test1.c
===================================================================
--- uspace/drv/test/test1/test1.c	(revision 5d360624a93a76b37638a8f8649329c5b272ea81)
+++ uspace/drv/test/test1/test1.c	(revision ef9460bf850bb5bfce022f58b89eb15728aced77)
@@ -74,5 +74,5 @@
 	}
 
-	rc = ddf_fun_add_match_id(fun, str_dup(match_id), match_score);
+	rc = ddf_fun_add_match_id(fun, match_id, match_score);
 	if (rc != EOK) {
 		ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s",
