diff -Nru stable/libparted/disk_dos.c stable-valgrind/libparted/disk_dos.c
--- stable/libparted/disk_dos.c	2005-08-01 20:30:06.000000000 +0200
+++ stable-valgrind/libparted/disk_dos.c	2005-08-03 09:40:58.108483936 +0200
@@ -1190,8 +1190,13 @@
 {
 	PED_ASSERT (part != NULL, return);
 
-	if (ped_partition_is_active (part))
+	if (ped_partition_is_active (part)) {
+		DosPartitionData* dos_data;
+		dos_data = (DosPartitionData*) part->disk_specific;
+		if (dos_data->orig)
+			ped_free (dos_data->orig);
 		ped_free (part->disk_specific);
+	}
 	ped_free (part);
 }
 
diff -Nru stable/libparted/fs_fat/traverse.c stable-valgrind/libparted/fs_fat/traverse.c
--- stable/libparted/fs_fat/traverse.c	2005-07-19 23:41:27.000000000 +0200
+++ stable-valgrind/libparted/fs_fat/traverse.c	2005-08-03 09:40:58.126481200 +0200
@@ -1,6 +1,6 @@
 /*
     libparted
-    Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+    Copyright (C) 1998, 1999, 2000, 2005 Free Software Foundation, Inc.
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -190,6 +190,7 @@
 			return 0;
 	}
 	ped_free (trav_info->dir_entries);
+	ped_free (trav_info->dir_name);
 	ped_free (trav_info);
 	return 1;
 }
diff -Nru stable/libparted/linux.c stable-valgrind/libparted/linux.c
--- stable/libparted/linux.c	2005-07-19 23:41:27.000000000 +0200
+++ stable-valgrind/libparted/linux.c	2005-08-03 09:40:58.144478464 +0200
@@ -355,7 +355,7 @@
 _device_get_sector_size (PedDevice* dev)
 {
 	LinuxSpecific*	arch_specific = LINUX_SPECIFIC (dev);
-	int		sector_size;
+	int		sector_size = PED_SECTOR_SIZE; /*makes Valgrind happy*/
 
 	PED_ASSERT (dev->open_count, return 0);
 
diff -Nru stable/parted/ui.c stable-valgrind/parted/ui.c
--- stable/parted/ui.c	2005-07-27 21:34:43.000000000 +0200
+++ stable-valgrind/parted/ui.c	2005-08-03 09:41:01.947900256 +0200
@@ -550,8 +550,10 @@
 	}
 
 	ped_free (def_str);
-	if (!input)
+	if (!input) {
+		*range = NULL;
 		return 0;
+	}
 
 	valid = ped_unit_parse (input, dev, value, range);
 
