Accepting request 857003 from home:iznogood:branches:Base:System
Add upstream patches OBS-URL: https://build.opensuse.org/request/show/857003 OBS-URL: https://build.opensuse.org/package/show/Base:System/udisks2?expand=0&rev=87
This commit is contained in:
parent
6b68b27121
commit
50a0c3559e
76
udisks2-Fix-memory-leaks.patch
Normal file
76
udisks2-Fix-memory-leaks.patch
Normal file
@ -0,0 +1,76 @@
|
||||
From 7c23020e3b6931395f85a08f6ab2b764a5625e43 Mon Sep 17 00:00:00 2001
|
||||
From: Vojtech Trefny <vtrefny@redhat.com>
|
||||
Date: Tue, 29 Sep 2020 13:00:53 +0200
|
||||
Subject: [PATCH] Memory leak fixes
|
||||
|
||||
Fixes for leaks found by new version of coverity.
|
||||
---
|
||||
modules/zram/udiskszramutil.c | 3 +++
|
||||
src/udiskslinuxdriveata.c | 1 +
|
||||
src/udiskslinuxfilesystem.c | 2 +-
|
||||
tools/udisksctl.c | 2 ++
|
||||
4 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules/zram/udiskszramutil.c b/modules/zram/udiskszramutil.c
|
||||
index 96b2d66ad..2c64eb9d3 100644
|
||||
--- a/modules/zram/udiskszramutil.c
|
||||
+++ b/modules/zram/udiskszramutil.c
|
||||
@@ -95,8 +95,11 @@ set_conf_property (char *filename,
|
||||
if (rename (tmpfname, filename))
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errno),"%m");
|
||||
+ g_free (tmpfname);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+ g_free (tmpfname);
|
||||
+
|
||||
return TRUE;
|
||||
}
|
||||
diff --git a/src/udiskslinuxdriveata.c b/src/udiskslinuxdriveata.c
|
||||
index 4ba66d09a..f4e848c52 100644
|
||||
--- a/src/udiskslinuxdriveata.c
|
||||
+++ b/src/udiskslinuxdriveata.c
|
||||
@@ -582,6 +582,7 @@ udisks_linux_drive_ata_refresh_smart_sync (UDisksLinuxDriveAta *drive,
|
||||
UDISKS_ERROR,
|
||||
UDISKS_ERROR_FAILED,
|
||||
"sk_disk_open: %m");
|
||||
+ g_free (blob);
|
||||
goto out;
|
||||
}
|
||||
|
||||
diff --git a/src/udiskslinuxfilesystem.c b/src/udiskslinuxfilesystem.c
|
||||
index 3ae11c329..279d952b6 100644
|
||||
--- a/src/udiskslinuxfilesystem.c
|
||||
+++ b/src/udiskslinuxfilesystem.c
|
||||
@@ -697,9 +697,9 @@ calculate_mount_point (UDisksDaemon *daemon,
|
||||
}
|
||||
}
|
||||
g_free (orig_mount_point);
|
||||
- g_free (mount_dir);
|
||||
|
||||
out:
|
||||
+ g_free (mount_dir);
|
||||
g_clear_object (&object);
|
||||
g_free (escaped_user_name);
|
||||
return mount_point;
|
||||
diff --git a/tools/udisksctl.c b/tools/udisksctl.c
|
||||
index 3b0a48e56..7a5de65d2 100644
|
||||
--- a/tools/udisksctl.c
|
||||
+++ b/tools/udisksctl.c
|
||||
@@ -1282,6 +1282,7 @@ handle_command_unlock_lock (gint *argc,
|
||||
g_printerr ("Error unlocking %s: %s\n",
|
||||
udisks_block_get_device (block),
|
||||
error->message);
|
||||
+ g_clear_error (&error);
|
||||
goto out;
|
||||
}
|
||||
g_variant_builder_add (&builder,
|
||||
@@ -3103,6 +3104,7 @@ handle_command_status (gint *argc,
|
||||
serial,
|
||||
block);
|
||||
g_free (block);
|
||||
+ g_free (vendor_model);
|
||||
}
|
||||
|
||||
|
23
udisks2-lvm2-Fix-leaking-BDLVMVDOPooldata.patch
Normal file
23
udisks2-lvm2-Fix-leaking-BDLVMVDOPooldata.patch
Normal file
@ -0,0 +1,23 @@
|
||||
From f8ff05687c8163ee361d170b5e1f344d9e79d10e Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
||||
Date: Mon, 23 Nov 2020 16:58:17 +0100
|
||||
Subject: [PATCH] lvm2: Fix leaking BDLVMVDOPooldata
|
||||
|
||||
---
|
||||
modules/lvm2/udiskslinuxvolumegroupobject.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/modules/lvm2/udiskslinuxvolumegroupobject.c b/modules/lvm2/udiskslinuxvolumegroupobject.c
|
||||
index e3bc8dfc0..ce941cb25 100644
|
||||
--- a/modules/lvm2/udiskslinuxvolumegroupobject.c
|
||||
+++ b/modules/lvm2/udiskslinuxvolumegroupobject.c
|
||||
@@ -652,6 +652,9 @@ update_vg (GObject *source_obj,
|
||||
else
|
||||
udisks_linux_logical_volume_object_update (volume, lv_info, meta_lv_info, vdo_info, &needs_polling);
|
||||
|
||||
+ if (vdo_info)
|
||||
+ bd_lvm_vdopooldata_free (vdo_info);
|
||||
+
|
||||
g_hash_table_insert (new_lvs, (gchar *)lv_name, volume);
|
||||
}
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Dec 19 16:16:59 UTC 2020 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||
|
||||
- Add upstream bugfix patches:
|
||||
+ udisks2-Fix-memory-leaks.patch
|
||||
+ udisks2-lvm2-Fix-leaking-BDLVMVDOPooldata.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 6 07:24:30 UTC 2020 - Milan Savić <milsav92@outlook.com>
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
%define somajor 0
|
||||
%define libudisks lib%{name}-%{somajor}
|
||||
%define libblockdev_version 2.19
|
||||
|
||||
Name: udisks2
|
||||
Version: 2.9.1
|
||||
Release: 0
|
||||
@ -26,7 +27,10 @@ Summary: Disk Manager
|
||||
License: GPL-2.0-or-later AND LGPL-2.0-or-later
|
||||
Group: System/Daemons
|
||||
URL: https://github.com/storaged-project/udisks
|
||||
Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2
|
||||
Source0: %{url}/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2
|
||||
Patch0: udisks2-Fix-memory-leaks.patch
|
||||
Patch1: udisks2-lvm2-Fix-leaking-BDLVMVDOPooldata.patch
|
||||
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: docbook-xsl-stylesheets
|
||||
BuildRequires: gobject-introspection-devel >= 0.6.2
|
||||
|
Loading…
Reference in New Issue
Block a user