Accepting request 35792 from filesystems

Copy from filesystems/btrfsprogs based on submit request 35792 from user dirkmueller

OBS-URL: https://build.opensuse.org/request/show/35792
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/btrfsprogs?expand=0&rev=10
This commit is contained in:
OBS User autobuild 2010-03-26 15:47:29 +00:00 committed by Git OBS Bridge
parent 1d33aa6fc7
commit ff7a101bf5
3 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From 4145e527ba81c288aa081073e1ce68fa0ceb4107 Mon Sep 17 00:00:00 2001
From: Dirk Mueller <dmueller@suse.de>
Date: Fri, 26 Mar 2010 11:25:43 +0100
Subject: [PATCH] Plug Memory leak in find_and_setup_log_root()
The error path forgets to free a previously allocated
memory structure.
---
disk-io.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/disk-io.c b/disk-io.c
index addebe1..eab3f0b 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -422,12 +422,13 @@ static int find_and_setup_log_root(struct btrfs_root *tree_root,
struct btrfs_super_block *disk_super)
{
u32 blocksize;
+ struct btrfs_root *log_root;
u64 blocknr = btrfs_super_log_root(disk_super);
- struct btrfs_root *log_root = malloc(sizeof(struct btrfs_root));
if (blocknr == 0)
return 0;
+ log_root = malloc(sizeof(struct btrfs_root));
blocksize = btrfs_level_size(tree_root,
btrfs_super_log_root_level(disk_super));
--
1.7.0.2

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Mar 26 13:24:15 CET 2010 - dmueller@suse.de
- fix memory leak (bnc#537633)
-------------------------------------------------------------------
Thu Mar 4 22:48:17 CET 2010 - jeffm@suse.de

View File

@ -20,7 +20,7 @@
Name: btrfsprogs
Url: http://oss.oracle.com/~mason/btrfs/
Version: 0.19
Release: 6
Release: 7
Summary: Btrfs File System Utilities
License: GNU General Public License (GPL)
Group: System/Filesystems
@ -31,6 +31,7 @@ Patch1: 0001-used-space-accounting-fix-for-the-converter.patch
Patch2: 0002-btrfsctl-add-snapshot-subvolume-destroy-ioctl.patch
Patch3: 0003-btrfsck-check-root-back-forward-references.patch
Patch4: 0004-Add-btrfs-map-logical-program-to-map-and-read-logica.patch
Patch5: 0001-Plug-Memory-leak-in-find_and_setup_log_root.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libacl-devel libext2fs-devel libuuid-devel zlib-devel
@ -45,6 +46,7 @@ file systems.
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
make %{?jobs:-j%jobs} CFLAGS="%{optflags}" all convert