Displaying 4 results from an estimated 4 matches for "blkid_free_probe".
2013 Apr 11
2
[PATCH 1/2] btrfs-progs: replace blkid_probe_get_wholedisk_devno
...!devname)
-		return 0;
-
-	dev = strrchr(devname, ''/'');
-	dev++;
+	/* Get whole disk name (not full path) for this devno */
+	blkid_devno_to_wholedisk(disk, dev, sizeof(dev), NULL);
 
 	snprintf(path, PATH_MAX, "/sys/block/%s/queue/rotational", dev);
 
-	free(devname);
 	blkid_free_probe(probe);
 
 	fd = open(path, O_RDONLY);
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
2012 Feb 14
1
[PATCH RFC] blkid: start using libblkid directly instead
...if (len > 0 && out[len-1] == '\n')
-    out[len-1] = '\0';
+  rc = blkid_do_safeprobe (blkprobe);
+  if (!rc)
+    blkid_probe_lookup_value (blkprobe, tag, &data, NULL);
 
-  return out;                   /* caller frees */
+done:
+  close (fd);
+  if (blkprobe)
+    blkid_free_probe (blkprobe);
+  return data ? strdup ((char *) data) : NULL;
 }
 
 char *
-- 
1.7.9
2013 Sep 04
0
[PATCH] Btrfs-progs: fix compile warning in is_ssd()
...@ -1220,7 +1221,12 @@ static int is_ssd(const char *file)
 		return 0;
 
 	/* Get whole disk name (not full path) for this devno */
-	blkid_devno_to_wholedisk(devno, wholedisk, sizeof(wholedisk), NULL);
+	ret = blkid_devno_to_wholedisk(devno,
+			wholedisk, sizeof(wholedisk), NULL);
+	if (ret) {
+		blkid_free_probe(probe);
+		return 0;
+	}
 
 	snprintf(sysfs_path, PATH_MAX, "/sys/block/%s/queue/rotational",
 		 wholedisk);
-- 
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http...
2013 Sep 05
12
[PATCH 0/5] Memory leaks amended
Memory leaks found by the tool--valgrind along with static reviewing.
Based on Daivd''s branch ''integration-20130903''.
Gui Hecheng (5):
  btrfs-progs:free local variable buf upon unsuccessful returns
  btrfs-progs:local variable memory freed
  btrfs-progs: missing tree-freeing statements added
  btrfs-progs:free the local list pending_list in btrfs_scan_one_dir