9a063f8a1f
patches that won't harm (bnc#888215), See NEWS for specifics: coreutils-improve_df_--human_and_--si,_help_and_man_page.patch coreutils-avoid_sizeof_charPP__static_analysis_warning.patch coreutils-also_deduplicate_virtual_file_systems.patch coreutils-fix_handling_of_symlinks_in_mount_list.patch coreutils-ignore_non_file_system_entries_in_proc_mounts.patch coreutils-avoid_clang_-Wtautological-constant-out-of-range-compare_warning.patch coreutils-use_the_last_device_name_provided_by_the_system.patch coreutils-avoid_compiler_warnings_with_some_assert_implementations.patch coreutils-use_all_of_the_last_device_details_provided.patch coreutils-output_placeholder_values_for_inaccessible_mount_points.patch coreutils-look_for_accessible_mount_points_for_specified_devices.patch coreutils-report_correct_device_in_presence_of_eclipsed_mounts.patch coreutils-avoid_an_inconsequential_mem_leak.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=233
45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
commit dbd7c9452a121f948b4eabbe22e07ad13900bc9b
|
|
Author: Pádraig Brady <P@draigBrady.com>
|
|
Date: Sun Jul 13 19:16:42 2014 +0100
|
|
|
|
maint: avoid an inconsequential mem leak
|
|
|
|
* src/df.c (get_disk): Avoid an inconsequential mem leak
|
|
spotted by coverity. Also s/duplicities/duplicates/.
|
|
|
|
diff --git a/src/df.c b/src/df.c
|
|
index 063cabf..3ef5d33 100644
|
|
--- a/src/df.c
|
|
+++ b/src/df.c
|
|
@@ -44,7 +44,7 @@
|
|
proper_name ("Paul Eggert")
|
|
|
|
/* Filled with device numbers of examined file systems to avoid
|
|
- duplicities in output. */
|
|
+ duplicates in output. */
|
|
static struct devlist
|
|
{
|
|
dev_t dev_num;
|
|
@@ -604,7 +604,7 @@ excluded_fstype (const char *fstype)
|
|
}
|
|
|
|
/* Filter mount list by skipping duplicate entries.
|
|
- In the case of duplicities - based on the device number - the mount entry
|
|
+ In the case of duplicates - based on the device number - the mount entry
|
|
with a '/' in its me_devname (i.e. not pseudo name like tmpfs) wins.
|
|
If both have a real devname (e.g. bind mounts), then that with the shorter
|
|
me_mountdir wins. With DEVICES_ONLY == true (set with df -a), only update
|
|
@@ -1185,7 +1185,11 @@ get_disk (char const *disk)
|
|
{
|
|
best_match = me;
|
|
if (len == 1) /* Traditional root. */
|
|
- break;
|
|
+ {
|
|
+ free (last_device);
|
|
+ free (canon_dev);
|
|
+ break;
|
|
+ }
|
|
else
|
|
best_match_len = len;
|
|
}
|