diff --git a/kdelibs-4.2.2-kde#180785-2.patch b/kdelibs-4.2.2-kde#180785-2.patch new file mode 100644 index 0000000..b2ed2bb --- /dev/null +++ b/kdelibs-4.2.2-kde#180785-2.patch @@ -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; + } + } + + diff --git a/kdelibs.spec b/kdelibs.spec index b0f121c..787292c 100644 --- a/kdelibs.spec +++ b/kdelibs.spec @@ -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 4.2.2-7 +- fix and simplify the child struct disposal (kde#180785) + * Sat Apr 18 2009 Rex Dieter 4.2.2-6 - squash leaky file descriptors in kdeinit (kde#180785,rhbz#484370)