Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwsetup-ng.git;a=commitdiff;h=83df7b48f5bd2516ed8ffa5adb564226ee954205
commit 83df7b48f5bd2516ed8ffa5adb564226ee954205 Author: James Buren <[email protected]> Date: Tue Sep 11 09:27:24 2012 -0500 free new PedConstraint cache on destruction diff --git a/src/utility.c b/src/utility.c index e3786c8..ee37b28 100644 --- a/src/utility.c +++ b/src/utility.c @@ -236,7 +236,7 @@ extern struct parted *parted_open(const char *path) extern bool parted_new_disk_label(struct parted *parted,PedDiskType *type) { - if(parted == 0 || parted->device == 0 || type == 0) + if(parted == 0 || parted->device == 0 || parted->constraint == 0 || type == 0) { errno = EINVAL; fprintf(logfile,"%s: %s\n",__func__,strerror(errno)); @@ -258,9 +258,8 @@ extern bool parted_new_partition(struct parted *parted,const char *size) PedSector sector = 0; PedGeometry *range = 0; PedPartition *part = 0; - bool result = false; - if(parted == 0 || parted->device == 0 || parted->disk == 0 || size == 0) + if(parted == 0 || parted->device == 0 || parted->constraint == 0 || parted->disk == 0 || size == 0) { errno = EINVAL; fprintf(logfile,"%s: %s\n",__func__,strerror(errno)); @@ -294,7 +293,7 @@ extern bool parted_delete_last_partition(struct parted *parted) { PedPartition *part = 0; - if(parted == 0 || parted->device == 0 || parted->disk == 0) + if(parted == 0 || parted->device == 0 || parted->constraint == 0 || parted->disk == 0) { errno = EINVAL; fprintf(logfile,"%s: %s\n",__func__,strerror(errno)); @@ -321,6 +320,9 @@ extern void parted_close(struct parted *parted) { if(parted->disk != 0) ped_disk_destroy(parted->disk); + + if(parted->constraint != 0) + ped_constraint_destroy(parted->constraint); if(parted->device != 0) ped_device_destroy(parted->device); _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
