]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
test/time-sem.c: unlock the accept mutex before exiting (error conditions).
authorYann Ylavic <ylavic@apache.org>
Tue, 7 Sep 2021 08:52:23 +0000 (08:52 +0000)
committerYann Ylavic <ylavic@apache.org>
Tue, 7 Sep 2021 08:52:23 +0000 (08:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893011 13f79535-47bb-0310-9956-ffa450edef68

test/time-sem.c

index 7bd0501ee5cfe404971731fe464a8253088d0c90..60e59826773bdfb8c32bb13c5c42ec4d0a099dc5 100644 (file)
@@ -548,6 +548,7 @@ void main (int argc, char **argv)
             exit (0);
         } else if (pid == -1) {
             perror ("fork");
+            accept_mutex_off ();
             exit (1);
         }
     }
@@ -555,6 +556,7 @@ void main (int argc, char **argv)
     /* a quick test to see that nothing is screwed up */
     if (*shared_counter != 0) {
         puts ("WTF! shared_counter != 0 before the children have been started!");
+        accept_mutex_off ();
         exit (1);
     }