* Sun Apr 19 2009 Rex Dieter <rdieter@fedoraproject.org> 4.2.2-7
- fix and simplify the child struct disposal (kde#180785)
This commit is contained in:
parent
8504c506af
commit
5965f532ef
39
kdelibs-4.2.2-kde#180785-2.patch
Normal file
39
kdelibs-4.2.2-kde#180785-2.patch
Normal file
@ -0,0 +1,39 @@
|
||||
--- branches/KDE/4.2/kdelibs/kinit/kinit.cpp 2009/04/18 19:34:41 955904
|
||||
+++ branches/KDE/4.2/kdelibs/kinit/kinit.cpp 2009/04/19 10:43:38 956037
|
||||
@@ -254,10 +254,9 @@
|
||||
/* Notify wrapper program that the child it started has finished. */
|
||||
static void child_died(pid_t exit_pid, int exit_status)
|
||||
{
|
||||
- struct child *child = children;
|
||||
- struct child *prev = NULL;
|
||||
+ struct child *child, **childptr = &children;
|
||||
|
||||
- while (child)
|
||||
+ while ((child = *childptr))
|
||||
{
|
||||
if (child->pid == exit_pid)
|
||||
{
|
||||
@@ -272,20 +271,12 @@
|
||||
write(child->sock, request_data, request_header.arg_length);
|
||||
close(child->sock);
|
||||
|
||||
- if (prev)
|
||||
- {
|
||||
- prev->next = child->next;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- child = NULL;
|
||||
- }
|
||||
+ *childptr = child->next;
|
||||
free(child);
|
||||
return;
|
||||
}
|
||||
|
||||
- prev = child;
|
||||
- child = child->next;
|
||||
+ childptr = &child->next;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
Summary: K Desktop Environment 4 - Libraries
|
||||
Version: 4.2.2
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
|
||||
%if 0%{?fedora} > 8
|
||||
Name: kdelibs
|
||||
@ -91,6 +91,7 @@ Patch100: kdelibs-4.2.2-kio_http.patch
|
||||
Patch101: kdelibs-4.2.2-kjob.patch
|
||||
Patch102: kdelibs-4.2.2-bidi-kde#189161.patch
|
||||
Patch103: kdelibs-4.2.2-kde#180785.patch
|
||||
Patch104: kdelibs-4.2.2-kde#180785-2.patch
|
||||
|
||||
# 4.3 branch
|
||||
Patch200: kdelibs-4.1.96-AllowExternalPaths.patch
|
||||
@ -235,6 +236,7 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage
|
||||
%patch101 -p0 -b .kjob
|
||||
%patch102 -p4 -b .bidi-kde#189161
|
||||
%patch103 -p4 -b .kde#180785
|
||||
%patch104 -p4 -b .kde#180785-2
|
||||
|
||||
# 4.3
|
||||
%patch200 -p1 -b .AllowExternalPaths
|
||||
@ -419,6 +421,9 @@ rm -rf %{buildroot}
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Apr 19 2009 Rex Dieter <rdieter@fedoraproject.org> 4.2.2-7
|
||||
- fix and simplify the child struct disposal (kde#180785)
|
||||
|
||||
* Sat Apr 18 2009 Rex Dieter <rdieter@fedoraproject.org> 4.2.2-6
|
||||
- squash leaky file descriptors in kdeinit (kde#180785,rhbz#484370)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user