OSDN Git Service

UI: plug a leak
authorJim Meyering <meyering@redhat.com>
Fri, 27 May 2011 12:27:41 +0000 (14:27 +0200)
committerJim Meyering <meyering@redhat.com>
Fri, 27 May 2011 12:27:41 +0000 (14:27 +0200)
* parted/ui.c (command_line_get_fs_type): Don't leak an FS type name
string.

parted/ui.c

index 5255538..7e2db32 100644 (file)
@@ -1082,6 +1082,7 @@ command_line_get_fs_type (const char* prompt, const PedFileSystemType*(* value))
                 ped_exception_throw (PED_EXCEPTION_ERROR, PED_EXCEPTION_CANCEL,
                                      _("Unknown file system type \"%s\"."),
                                      fs_type_name);
+                free (fs_type_name);
                 return 0;
         }