hdt: fix CLI crash when parsing unsupported geometries
authorPierre-Alexandre Meyer <pierre@mouraf.org>
Sat, 22 Aug 2009 16:42:37 +0000 (09:42 -0700)
committerPierre-Alexandre Meyer <pierre@mouraf.org>
Sat, 22 Aug 2009 17:09:35 +0000 (10:09 -0700)
Remove extra free() calls: these were needed before the introduction
of the disklib errno. We apparently forgot to remove them.

Reported-by: Gert Hulselmans <hulselmansgert@gmail.com>
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
com32/hdt/hdt-cli-disk.c

index ee7c10d..080e132 100644 (file)
@@ -95,7 +95,6 @@ static void show_partition_information(struct driveinfo *drive_info,
        } else if (error) {
                get_error(&error_buffer);
                more_printf("%s\n", error_buffer);
-               free(error_buffer);
        }
 
        more_printf("\n");
@@ -147,7 +146,6 @@ void main_show_disk(int argc, char **argv,
        if (parse_partition_table(d, &show_partition_information) == -1) {
                get_error(&error_buffer);
                more_printf("%s\n", error_buffer);
-               free(error_buffer);
        }
 }