Skip to content

Commit

Permalink
Fix end_input usage in do_resizepart
Browse files Browse the repository at this point in the history
It needs to be set to NULL, since it may not get set by the call to
command_line_get_sector
  • Loading branch information
bcl committed Oct 18, 2019
1 parent 86b76ad commit 883813c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parted/parted.c
Original file line number Diff line number Diff line change
Expand Up @@ -1545,6 +1545,7 @@ do_resizepart (PedDevice** dev, PedDisk** diskp)
PedGeometry *range_end = NULL;
PedConstraint* constraint;
int rc = 0;
char* end_input = NULL;

if (!disk) {
disk = ped_disk_new (*dev);
Expand All @@ -1565,7 +1566,6 @@ do_resizepart (PedDevice** dev, PedDisk** diskp)

start = part->geom.start;
end = oldend = part->geom.end;
char *end_input;
if (!command_line_get_sector (_("End?"), *dev, &end, &range_end, &end_input))
goto error;
_adjust_end_if_iec(&start, &end, range_end, end_input);
Expand Down

0 comments on commit 883813c

Please sign in to comment.