summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-12-16 18:20:23 +0100
committerJim Meyering <meyering@redhat.com>2009-12-16 18:20:23 +0100
commit4e02413718bee3813222b868e13c30ccc96ed764 (patch)
tree4c53384a24098f7f1c0fd1a3f891a3b651ff8d4d
parent7f5d6cfd525c520404c51770965328ece8da0a17 (diff)
downloadparted-4e02413718bee3813222b868e13c30ccc96ed764.tar.gz
libparted: plug a leak in mac_write
* libparted/labels/mac.c (mac_write): Free mac_driverdata.
-rw-r--r--libparted/labels/mac.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libparted/labels/mac.c b/libparted/labels/mac.c
index e90ab07..4f988a8 100644
--- a/libparted/labels/mac.c
+++ b/libparted/labels/mac.c
@@ -1163,7 +1163,9 @@ mac_write (PedDisk* disk)
mac_disk_data->part_map_entry_count))
goto error_free_part_map;
free (part_map);
- return write_block_zero (disk, mac_driverdata);
+ int write_ok = write_block_zero (disk, mac_driverdata);
+ free (mac_driverdata);
+ return write_ok;
error_free_part_map:
free (part_map);